Class WebMvcConfigurationSupport
- All Implemented Interfaces:
Aware,ApplicationContextAware,ServletContextAware
- Direct Known Subclasses:
DelegatingWebMvcConfiguration
@EnableWebMvc to an
application @Configuration class. An alternative more
advanced option is to extend directly from this class and override methods as
necessary, remembering to add @Configuration to the
subclass and @Bean to overridden @Bean methods.
For more details see the javadoc of @EnableWebMvc.
This class registers the following HandlerMappings:
RouterFunctionMappingordered at -1 to map router functions.RequestMappingHandlerMappingordered at 0 for mapping requests to annotated controller methods.HandlerMappingordered at 1 to map URL paths directly to view names.BeanNameUrlHandlerMappingordered at 2 to map URL paths to controller bean names.HandlerMappingordered atInteger.MAX_VALUE-1to serve static resource requests.HandlerMappingordered atInteger.MAX_VALUEto forward requests to the default servlet.
Registers these HandlerAdapters:
RequestMappingHandlerAdapterfor processing requests with annotated controller methods.HttpRequestHandlerAdapterfor processing requests withHttpRequestHandlers.SimpleControllerHandlerAdapterfor processing requests with interface-basedControllers.HandlerFunctionAdapterfor processing requests with router functions.
Registers a HandlerExceptionResolverComposite with this chain of
exception resolvers:
ExceptionHandlerExceptionResolverfor handling exceptions throughExceptionHandlermethods.ResponseStatusExceptionResolverfor exceptions annotated withResponseStatus.DefaultHandlerExceptionResolverfor resolving known Spring exception types
Registers an AntPathMatcher and a UrlPathHelper
to be used by:
- the
RequestMappingHandlerMapping, - the
HandlerMappingfor ViewControllers - and the
HandlerMappingfor serving resources
PathMatchConfigurer.
Both the RequestMappingHandlerAdapter and the
ExceptionHandlerExceptionResolver are configured with default
instances of the following by default:
- a
ContentNegotiationManager - a
DefaultFormattingConversionService - an
OptionalValidatorFactoryBeanif a JSR-303 implementation is available on the classpath - a range of
HttpMessageConvertersdepending on the third-party libraries available on the classpath.
- Since:
- 3.1
- Author:
- Rossen Stoyanchev, Brian Clozel, Sebastien Deleuze, Hyoungjune Kim
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) Add customHandlerMethodArgumentResolversto use in addition to the ones registered by default.protected voidaddCorsMappings(CorsRegistry registry) Override this method to configure cross-origin requests processing.protected final voidaddDefaultHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers, ContentNegotiationManager mvcContentNegotiationManager) A method available to subclasses for adding defaultHandlerExceptionResolvers.protected final voidaddDefaultHttpMessageConverters(List<HttpMessageConverter<?>> messageConverters) Adds a set of default HttpMessageConverter instances to the given list.protected voidaddFormatters(FormatterRegistry registry) Override this method to add customConverterand/orFormatterdelegates to the commonFormattingConversionService.protected voidaddInterceptors(InterceptorRegistry registry) Override this method to add Spring MVC interceptors for pre- and post-processing of controller invocation.protected voidaddResourceHandlers(ResourceHandlerRegistry registry) Override this method to add resource handlers for serving static resources.protected voidaddReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) Add customHandlerMethodReturnValueHandlersin addition to the ones registered by default.protected voidaddViewControllers(ViewControllerRegistry registry) Override this method to add view controllers.beanNameHandlerMapping(FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) Return aBeanNameUrlHandlerMappingordered at 2 to map URL paths to controller bean names.protected voidconfigureAsyncSupport(AsyncSupportConfigurer configurer) Override this method to configure asynchronous request processing options.protected voidOverride this method to configure content negotiation.protected voidOverride this method to configure "default" Servlet handling.protected voidconfigureErrorResponseInterceptors(List<ErrorResponse.Interceptor> interceptors) Override this method for control over theErrorResponse.Interceptor's to apply when rendering error responses.protected voidconfigureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) Override this method to configure the list ofHandlerExceptionResolversto use.protected voidconfigureMessageConverters(List<HttpMessageConverter<?>> converters) Override this method to add customHttpMessageConvertersto use with theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.protected voidconfigurePathMatch(PathMatchConfigurer configurer) Override this method to configure path matching options.protected voidconfigureViewResolvers(ViewResolverRegistry registry) Override this method to configure view resolution.protected ExceptionHandlerExceptionResolverProtected method for plugging in a custom subclass ofExceptionHandlerExceptionResolver.protected RequestMappingHandlerAdapterProtected method for plugging in a custom subclass ofRequestMappingHandlerAdapter.protected RequestMappingHandlerMappingProtected method for plugging in a custom subclass ofRequestMappingHandlerMapping.Return a handler mapping ordered at Integer.MAX_VALUE with a mapped default servlet handler.protected voidextendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) Override this method to extend or modify the list ofHandlerExceptionResolversafter it has been configured.protected voidextendMessageConverters(List<HttpMessageConverter<?>> converters) Override this method to extend or modify the list of converters after it has been configured.final ApplicationContextReturn the associated SpringApplicationContext.protected final List<HandlerMethodArgumentResolver>Provide access to the shared custom argument resolvers used by theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.protected AsyncSupportConfigurerCallback for building theAsyncSupportConfigurer.protected ConfigurableWebBindingInitializergetConfigurableWebBindingInitializer(FormattingConversionService mvcConversionService, Validator mvcValidator) Return theConfigurableWebBindingInitializerto use for initializing allWebDataBinderinstances.protected final Map<String,CorsConfiguration> Return the registeredCorsConfigurationobjects, keyed by path pattern.protected final List<ErrorResponse.Interceptor>Provide access to the list ofErrorResponse.Interceptor's to apply when rendering error responses.protected final Object[]getInterceptors(FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) Provide access to the shared handler interceptors used to configureHandlerMappinginstances with.protected MessageCodesResolverOverride this method to provide a customMessageCodesResolver.protected final List<HttpMessageConverter<?>>Provides access to the sharedHttpMessageConvertersused by theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.protected PathMatchConfigurerCallback for building thePathMatchConfigurer.protected final List<HandlerMethodReturnValueHandler>Provide access to the shared return value handlers used by theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.final ServletContextReturn the associatedServletContext.protected ValidatorOverride this method to provide a customValidator.handlerExceptionResolver(ContentNegotiationManager contentNegotiationManager) Returns aHandlerExceptionResolverCompositecontaining a list of exception resolvers obtained either throughconfigureHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>)or throughaddDefaultHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>, org.springframework.web.accept.ContentNegotiationManager).Returns aHandlerFunctionAdapterfor processing requests through handler functions.Returns aHttpRequestHandlerAdapterfor processing requests withHttpRequestHandlers.Return aContentNegotiationManagerinstance to use to determine requested media types in a given request.Return aFormattingConversionServicefor use with annotated controllers.Return a globalPathMatcherinstance which is used for URL path matching with String patterns.Return a globalPathPatternParserinstance to use for parsing patterns to match to theRequestPath.AResourceUrlProviderbean for use with the MVC dispatcher.mvcUriComponentsContributor(FormattingConversionService conversionService, RequestMappingHandlerAdapter requestMappingHandlerAdapter) Return an instance ofCompositeUriComponentsContributorfor use withMvcUriComponentsBuilder.Return a globalUrlPathHelperinstance which is used to resolve the request mapping path for an application.Return a globalValidatorinstance for example for validating@ModelAttributeand@RequestBodymethod arguments.mvcViewResolver(ContentNegotiationManager contentNegotiationManager) Register aViewResolverCompositethat contains a chain of view resolvers to use for view resolution.requestMappingHandlerAdapter(ContentNegotiationManager contentNegotiationManager, FormattingConversionService conversionService, Validator validator) Returns aRequestMappingHandlerAdapterfor processing requests through annotated controller methods.requestMappingHandlerMapping(ContentNegotiationManager contentNegotiationManager, FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) Return aRequestMappingHandlerMappingordered at 0 for mapping requests to annotated controllers.resourceHandlerMapping(ContentNegotiationManager contentNegotiationManager, FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) Return a handler mapping ordered at Integer.MAX_VALUE-1 with mapped resource handlers.routerFunctionMapping(FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) Return aRouterFunctionMappingordered at -1 to map router functions.voidsetApplicationContext(ApplicationContext applicationContext) Set the SpringApplicationContext, for example, for resource loading.voidsetServletContext(ServletContext servletContext) Set theServletContext, for example, for resource handling, looking up file extensions, etc.Returns aSimpleControllerHandlerAdapterfor processing requests with interface-based controllers.Deprecated.viewControllerHandlerMapping(FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) Return a handler mapping ordered at 1 to map URL paths directly to view names.
-
Constructor Details
-
WebMvcConfigurationSupport
public WebMvcConfigurationSupport()
-
-
Method Details
-
setApplicationContext
Set the SpringApplicationContext, for example, for resource loading.- Specified by:
setApplicationContextin interfaceApplicationContextAware- Parameters:
applicationContext- the ApplicationContext object to be used by this object- See Also:
-
getApplicationContext
Return the associated SpringApplicationContext.- Since:
- 4.2
-
setServletContext
Set theServletContext, for example, for resource handling, looking up file extensions, etc.- Specified by:
setServletContextin interfaceServletContextAware- Parameters:
servletContext- the ServletContext object to be used by this object- See Also:
-
getServletContext
Return the associatedServletContext.- Since:
- 4.2
-
requestMappingHandlerMapping
@Bean public RequestMappingHandlerMapping requestMappingHandlerMapping(@Qualifier("mvcContentNegotiationManager") ContentNegotiationManager contentNegotiationManager, @Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) Return aRequestMappingHandlerMappingordered at 0 for mapping requests to annotated controllers. -
createRequestMappingHandlerMapping
Protected method for plugging in a custom subclass ofRequestMappingHandlerMapping.- Since:
- 4.0
-
getInterceptors
protected final Object[] getInterceptors(FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) Provide access to the shared handler interceptors used to configureHandlerMappinginstances with.This method cannot be overridden; use
addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry)instead. -
addInterceptors
Override this method to add Spring MVC interceptors for pre- and post-processing of controller invocation.- See Also:
-
getPathMatchConfigurer
Callback for building thePathMatchConfigurer. Delegates toconfigurePathMatch(org.springframework.web.servlet.config.annotation.PathMatchConfigurer).- Since:
- 4.1
-
configurePathMatch
Override this method to configure path matching options.- Since:
- 4.0.3
- See Also:
-
mvcPatternParser
Return a globalPathPatternParserinstance to use for parsing patterns to match to theRequestPath. The returned instance can be configured usingconfigurePathMatch(PathMatchConfigurer).- Since:
- 5.3.4
-
mvcUrlPathHelper
Return a globalUrlPathHelperinstance which is used to resolve the request mapping path for an application. The instance can be configured viaconfigurePathMatch(PathMatchConfigurer).Note: This is only used when parsed patterns are not
enabled.- Since:
- 4.1
-
mvcPathMatcher
Return a globalPathMatcherinstance which is used for URL path matching with String patterns. The returned instance can be configured usingconfigurePathMatch(PathMatchConfigurer).Note: This is only used when parsed patterns are not
enabled.- Since:
- 4.1
-
mvcContentNegotiationManager
Return aContentNegotiationManagerinstance to use to determine requested media types in a given request. -
getDefaultMediaTypes
-
configureContentNegotiation
Override this method to configure content negotiation.- See Also:
-
viewControllerHandlerMapping
@Bean @Nullable public HandlerMapping viewControllerHandlerMapping(@Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) Return a handler mapping ordered at 1 to map URL paths directly to view names. To configure view controllers, overrideaddViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry). -
addViewControllers
Override this method to add view controllers.- See Also:
-
beanNameHandlerMapping
@Bean public BeanNameUrlHandlerMapping beanNameHandlerMapping(@Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) Return aBeanNameUrlHandlerMappingordered at 2 to map URL paths to controller bean names. -
routerFunctionMapping
@Bean public RouterFunctionMapping routerFunctionMapping(@Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) Return aRouterFunctionMappingordered at -1 to map router functions. Consider overriding one of these other more fine-grained methods:addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry)for adding handler interceptors.addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry)to configure cross origin requests processing.configureMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>>)for adding custom message converters.configurePathMatch(PathMatchConfigurer)for customizing thePathPatternParser.
- Since:
- 5.2
-
resourceHandlerMapping
@Bean @Nullable public HandlerMapping resourceHandlerMapping(@Qualifier("mvcContentNegotiationManager") ContentNegotiationManager contentNegotiationManager, @Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) Return a handler mapping ordered at Integer.MAX_VALUE-1 with mapped resource handlers. To configure resource handling, overrideaddResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry). -
addResourceHandlers
Override this method to add resource handlers for serving static resources.- See Also:
-
mvcResourceUrlProvider
AResourceUrlProviderbean for use with the MVC dispatcher.- Since:
- 4.1
-
defaultServletHandlerMapping
Return a handler mapping ordered at Integer.MAX_VALUE with a mapped default servlet handler. To configure "default" Servlet handling, overrideconfigureDefaultServletHandling(org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer). -
configureDefaultServletHandling
Override this method to configure "default" Servlet handling.- See Also:
-
requestMappingHandlerAdapter
@Bean public RequestMappingHandlerAdapter requestMappingHandlerAdapter(@Qualifier("mvcContentNegotiationManager") ContentNegotiationManager contentNegotiationManager, @Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("mvcValidator") Validator validator) Returns aRequestMappingHandlerAdapterfor processing requests through annotated controller methods. Consider overriding one of these other more fine-grained methods:addArgumentResolvers(java.util.List<org.springframework.web.method.support.HandlerMethodArgumentResolver>)for adding custom argument resolvers.addReturnValueHandlers(java.util.List<org.springframework.web.method.support.HandlerMethodReturnValueHandler>)for adding custom return value handlers.configureMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>>)for adding custom message converters.
-
createRequestMappingHandlerAdapter
Protected method for plugging in a custom subclass ofRequestMappingHandlerAdapter.- Since:
- 4.3
-
handlerFunctionAdapter
Returns aHandlerFunctionAdapterfor processing requests through handler functions.- Since:
- 5.2
-
getConfigurableWebBindingInitializer
protected ConfigurableWebBindingInitializer getConfigurableWebBindingInitializer(FormattingConversionService mvcConversionService, Validator mvcValidator) Return theConfigurableWebBindingInitializerto use for initializing allWebDataBinderinstances. -
getMessageCodesResolver
Override this method to provide a customMessageCodesResolver. -
mvcConversionService
Return aFormattingConversionServicefor use with annotated controllers.See
addFormatters(org.springframework.format.FormatterRegistry)as an alternative to overriding this method. -
addFormatters
Override this method to add customConverterand/orFormatterdelegates to the commonFormattingConversionService.- See Also:
-
mvcValidator
Return a globalValidatorinstance for example for validating@ModelAttributeand@RequestBodymethod arguments. Delegates togetValidator()first and if that returnsnullchecks the classpath for the presence of a JSR-303 implementations before creating aOptionalValidatorFactoryBean.If a JSR-303 implementation is not available, a no-opValidatoris returned. -
getValidator
Override this method to provide a customValidator. -
getArgumentResolvers
Provide access to the shared custom argument resolvers used by theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.This method cannot be overridden; use
addArgumentResolvers(java.util.List<org.springframework.web.method.support.HandlerMethodArgumentResolver>)instead.- Since:
- 4.3
-
addArgumentResolvers
Add customHandlerMethodArgumentResolversto use in addition to the ones registered by default.Custom argument resolvers are invoked before built-in resolvers except for those that rely on the presence of annotations (for example,
@RequestParameter,@PathVariable, etc). The latter can be customized by configuring theRequestMappingHandlerAdapterdirectly.- Parameters:
argumentResolvers- the list of custom converters (initially an empty list)
-
getReturnValueHandlers
Provide access to the shared return value handlers used by theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.This method cannot be overridden; use
addReturnValueHandlers(java.util.List<org.springframework.web.method.support.HandlerMethodReturnValueHandler>)instead.- Since:
- 4.3
-
addReturnValueHandlers
Add customHandlerMethodReturnValueHandlersin addition to the ones registered by default.Custom return value handlers are invoked before built-in ones except for those that rely on the presence of annotations (for example,
@ResponseBody,@ModelAttribute, etc). The latter can be customized by configuring theRequestMappingHandlerAdapterdirectly.- Parameters:
returnValueHandlers- the list of custom handlers (initially an empty list)
-
getMessageConverters
Provides access to the sharedHttpMessageConvertersused by theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.This method cannot be overridden; use
configureMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>>)instead. Also seeaddDefaultHttpMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>>)for adding default message converters. -
configureMessageConverters
Override this method to add customHttpMessageConvertersto use with theRequestMappingHandlerAdapterand theExceptionHandlerExceptionResolver.Adding converters to the list turns off the default converters that would otherwise be registered by default. Also see
addDefaultHttpMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>>)for adding default message converters.- Parameters:
converters- a list to add message converters to (initially an empty list)
-
extendMessageConverters
Override this method to extend or modify the list of converters after it has been configured. This may be useful for example to allow default converters to be registered and then insert a custom converter through this method.- Parameters:
converters- the list of configured converters to extend- Since:
- 4.1.3
-
addDefaultHttpMessageConverters
protected final void addDefaultHttpMessageConverters(List<HttpMessageConverter<?>> messageConverters) Adds a set of default HttpMessageConverter instances to the given list. Subclasses can call this method fromconfigureMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>>).- Parameters:
messageConverters- the list to add the default message converters to
-
getAsyncSupportConfigurer
Callback for building theAsyncSupportConfigurer. Delegates toconfigureAsyncSupport(AsyncSupportConfigurer).- Since:
- 5.3.2
-
configureAsyncSupport
Override this method to configure asynchronous request processing options.- See Also:
-
mvcUriComponentsContributor
@Bean public CompositeUriComponentsContributor mvcUriComponentsContributor(@Qualifier("mvcConversionService") FormattingConversionService conversionService, @Qualifier("requestMappingHandlerAdapter") RequestMappingHandlerAdapter requestMappingHandlerAdapter) Return an instance ofCompositeUriComponentsContributorfor use withMvcUriComponentsBuilder.- Since:
- 4.0
-
httpRequestHandlerAdapter
Returns aHttpRequestHandlerAdapterfor processing requests withHttpRequestHandlers. -
simpleControllerHandlerAdapter
Returns aSimpleControllerHandlerAdapterfor processing requests with interface-based controllers. -
handlerExceptionResolver
@Bean public HandlerExceptionResolver handlerExceptionResolver(@Qualifier("mvcContentNegotiationManager") ContentNegotiationManager contentNegotiationManager) Returns aHandlerExceptionResolverCompositecontaining a list of exception resolvers obtained either throughconfigureHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>)or throughaddDefaultHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>, org.springframework.web.accept.ContentNegotiationManager).Note: This method cannot be made final due to CGLIB constraints. Rather than overriding it, consider overriding
configureHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>)which allows for providing a list of resolvers. -
configureHandlerExceptionResolvers
protected void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) Override this method to configure the list ofHandlerExceptionResolversto use.Adding resolvers to the list turns off the default resolvers that would otherwise be registered by default. Also see
addDefaultHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>, org.springframework.web.accept.ContentNegotiationManager)that can be used to add the default exception resolvers.- Parameters:
exceptionResolvers- a list to add exception resolvers to (initially an empty list)
-
extendHandlerExceptionResolvers
Override this method to extend or modify the list ofHandlerExceptionResolversafter it has been configured.This may be useful for example to allow default resolvers to be registered and then insert a custom one through this method.
- Parameters:
exceptionResolvers- the list of configured resolvers to extend.- Since:
- 4.3
-
addDefaultHandlerExceptionResolvers
protected final void addDefaultHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers, ContentNegotiationManager mvcContentNegotiationManager) A method available to subclasses for adding defaultHandlerExceptionResolvers.Adds the following exception resolvers:
ExceptionHandlerExceptionResolverfor handling exceptions throughExceptionHandlermethods.ResponseStatusExceptionResolverfor exceptions annotated withResponseStatus.DefaultHandlerExceptionResolverfor resolving known Spring exception types
-
createExceptionHandlerExceptionResolver
Protected method for plugging in a custom subclass ofExceptionHandlerExceptionResolver.- Since:
- 4.3
-
getErrorResponseInterceptors
Provide access to the list ofErrorResponse.Interceptor's to apply when rendering error responses.This method cannot be overridden; use
configureErrorResponseInterceptors(List)instead.- Since:
- 6.2
-
configureErrorResponseInterceptors
Override this method for control over theErrorResponse.Interceptor's to apply when rendering error responses.- Parameters:
interceptors- the list to add handlers to- Since:
- 6.2
-
mvcViewResolver
@Bean public ViewResolver mvcViewResolver(@Qualifier("mvcContentNegotiationManager") ContentNegotiationManager contentNegotiationManager) Register aViewResolverCompositethat contains a chain of view resolvers to use for view resolution. By default, this resolver is ordered at 0 unless content negotiation view resolution is used in which case the order is raised toOrdered.HIGHEST_PRECEDENCE.If no other resolvers are configured,
ViewResolverComposite.resolveViewName(String, Locale)returns null in order to allow other potentialViewResolverbeans to resolve views.- Since:
- 4.1
-
configureViewResolvers
Override this method to configure view resolution.- See Also:
-
getCorsConfigurations
Return the registeredCorsConfigurationobjects, keyed by path pattern.- Since:
- 4.2
-
addCorsMappings
Override this method to configure cross-origin requests processing.- Since:
- 4.2
- See Also:
-
mvcHandlerMappingIntrospector
-
localeResolver
-
themeResolver
Deprecated. -
flashMapManager
-
viewNameTranslator
-