@Configuration public class CustomWebMvcConfiguration extends DelegatingWebMvcConfiguration
Configuration that is roughly equivalent to the EnableWebMvc
annotation, but uses slightly different default settings.
This configuration makes a few modifications to the configuration used by
@EnableWebMvc.
true for
RequestMappingHandlerAdapter.setIgnoreDefaultModelOnRedirect(boolean)
, thus ensuring that model parameters are not appended to a redirect URL.
This is actually the setting recommended by the Spring documentation, but it
is not the default used by Spring due to backward compatibility issues.
RequestMappingHandlerMapping with
PublicOnlyRequestMappingHandlerMapping. Using this modified mapping
ensures that only public methods are used to handle requests.
RequestMapping annotations on other methods are ignored and a warning
message is logged. Using @RequestMapping with non-public methods
is dangerous, because other annotations that rely on AOP proxying might get
ignored on such methods.removeSemicolonContent property of the
RequestMappingHandlerMapping to false, so that path
variables that contain a semicolon are handled correctly.| Constructor and Description |
|---|
CustomWebMvcConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
RequestMappingHandlerAdapter |
requestMappingHandlerAdapter() |
RequestMappingHandlerMapping |
requestMappingHandlerMapping() |
addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator, setConfigurersaddDefaultHandlerExceptionResolvers, addDefaultHttpMessageConverters, beanNameHandlerMapping, createExceptionHandlerExceptionResolver, createRequestMappingHandlerAdapter, createRequestMappingHandlerMapping, defaultServletHandlerMapping, getApplicationContext, getArgumentResolvers, getConfigurableWebBindingInitializer, getCorsConfigurations, getDefaultMediaTypes, getInterceptors, getMessageConverters, getPathMatchConfigurer, getReturnValueHandlers, getServletContext, handlerExceptionResolver, httpRequestHandlerAdapter, mvcContentNegotiationManager, mvcConversionService, mvcPathMatcher, mvcResourceUrlProvider, mvcUriComponentsContributor, mvcUrlPathHelper, mvcValidator, mvcViewResolver, resourceHandlerMapping, setApplicationContext, setServletContext, simpleControllerHandlerAdapter, viewControllerHandlerMapping@Bean public RequestMappingHandlerAdapter requestMappingHandlerAdapter()
requestMappingHandlerAdapter in class WebMvcConfigurationSupport@Bean public RequestMappingHandlerMapping requestMappingHandlerMapping()
requestMappingHandlerMapping in class WebMvcConfigurationSupportCopyright © 2011–2017 aquenos GmbH. All rights reserved.