Package com.aquima.web.config
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
Constructors Constructor Description StaticResourceConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addReturnValueHandlers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
-
-
-
Method Detail
-
addResourceHandlers
public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
- Specified by:
addResourceHandlers
in interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addViewControllers
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 interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
-