public abstract class RouterConfigurationSupport
extends org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
RouterHandlerMapping,
on top of the existing WebMvcConfigurationSupport.
Unlike WebMvcConfigurationSupport, you SHOULD NOT import it using
@EnableWebMvc within an application
@Configuration class.
Extending this class and adding @Configuration
is enough. You should also implement the configureRouteFiles method to add the list of route
configuration files.
You can then instantiate your own beans and override WebMvcConfigurationSupport methods.
This class registers the following HandlerMappings:
RouterHandlerMapping
ordered at 0 for mapping requests to annotated controller methods.
HandlerMapping
ordered at 1 to map URL paths directly to view names.
BeanNameUrlHandlerMapping
ordered at 2 to map URL paths to controller bean names.
RequestMappingHandlerMapping
ordered at 3 for mapping requests to annotated controller methods.
HandlerMapping
ordered at Integer.MAX_VALUE-1 to serve static resource requests.
HandlerMapping
ordered at Integer.MAX_VALUE to forward requests to the default servlet.
WebMvcConfigurationSupport| Constructor and Description |
|---|
RouterConfigurationSupport() |
| Modifier and Type | Method and Description |
|---|---|
RouterHandlerMapping |
createRouterHandlerMapping()
Return a
RouterHandlerMapping ordered at 0 for mapping
requests to controllers' actions mapped by routes. |
protected boolean |
isHandlerMappingReloadEnabled()
By default, route configuration files auto-reload is not enabled.
|
abstract List<String> |
listRouteFiles()
Return the ordered list of route configuration files to be loaded
by the Router at startup.
|
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping |
requestMappingHandlerMapping()
Return a
RequestMappingHandlerMapping ordered at 3 for mapping
requests to annotated controllers. |
addArgumentResolvers, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, getMessageCodesResolver, getValidator, setConfigurersaddDefaultHandlerExceptionResolvers, addDefaultHttpMessageConverters, beanNameHandlerMapping, defaultServletHandlerMapping, getConfigurableWebBindingInitializer, getDefaultMediaTypes, getInterceptors, getMessageConverters, handlerExceptionResolver, httpRequestHandlerAdapter, mvcContentNegotiationManager, mvcConversionService, mvcValidator, requestMappingHandlerAdapter, resourceHandlerMapping, setApplicationContext, setServletContext, simpleControllerHandlerAdapter, viewControllerHandlerMapping@Bean public RouterHandlerMapping createRouterHandlerMapping()
RouterHandlerMapping ordered at 0 for mapping
requests to controllers' actions mapped by routes.protected boolean isHandlerMappingReloadEnabled()
RouterHandlerMapping@Bean public org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping requestMappingHandlerMapping()
RequestMappingHandlerMapping ordered at 3 for mapping
requests to annotated controllers.requestMappingHandlerMapping in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupportCopyright © 2010-2014. All Rights Reserved.