Class StaticResourceConfiguration

java.lang.Object
com.aquima.web.config.StaticResourceConfiguration
All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@RootConfiguration public class StaticResourceConfiguration extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Resource configuration to be able to serve Angular based apps from the Blueriq out-of-the-box installation and war applications
Since:
11.0
Author:
r.de.haard
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
     
    void
    addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
    Adds views for the root of and forwards the root of "/app/" to serve the index.html.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer Link icon

    addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addInterceptors, addReturnValueHandlers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
  • Constructor Details Link icon

    • StaticResourceConfiguration Link icon

      public StaticResourceConfiguration()
  • Method Details Link icon

    • addResourceHandlers Link icon

      public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
      Specified by:
      addResourceHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • addViewControllers Link icon

      public void addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
      Adds views for the root of and forwards the root of "/app/" to serve the index.html. This is needed to enable routes in Angular and keep the browser refresh working when an angular app is provided as static resource
      Specified by:
      addViewControllers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer