Class WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter
java.lang.Object
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.web.context.ServletContextAware,org.springframework.web.servlet.config.annotation.WebMvcConfigurer
- Enclosing class:
- WebMvcAutoConfiguration
@Configuration(proxyBeanMethods=false)
@Import(EnableWebMvcConfiguration.class)
@EnableConfigurationProperties({WebMvcProperties.class,WebProperties.class})
@Order(0)
public static class WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer, org.springframework.web.context.ServletContextAware
-
Constructor Summary
ConstructorsConstructorDescriptionWebMvcAutoConfigurationAdapter(WebProperties webProperties, WebMvcProperties mvcProperties, org.springframework.beans.factory.ListableBeanFactory beanFactory, org.springframework.beans.factory.ObjectProvider<HttpMessageConverters> messageConvertersProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.ResourceHandlerRegistrationCustomizer> resourceHandlerRegistrationCustomizerProvider, org.springframework.beans.factory.ObjectProvider<DispatcherServletPath> dispatcherServletPath, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.web.servlet.ServletRegistrationBean<?>> servletRegistrations) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFormatters(org.springframework.format.FormatterRegistry registry) voidaddResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) org.springframework.web.servlet.view.BeanNameViewResolvervoidconfigureAsyncSupport(org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer configurer) voidconfigureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer) voidconfigureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) voidconfigurePathMatch(org.springframework.web.servlet.config.annotation.PathMatchConfigurer configurer) org.springframework.web.servlet.view.InternalResourceViewResolverorg.springframework.validation.MessageCodesResolverstatic org.springframework.web.filter.RequestContextFiltervoidsetServletContext(jakarta.servlet.ServletContext servletContext) org.springframework.web.servlet.view.ContentNegotiatingViewResolverviewResolver(org.springframework.beans.factory.BeanFactory beanFactory) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addInterceptors, addReturnValueHandlers, addViewControllers, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getValidator
-
Constructor Details
-
WebMvcAutoConfigurationAdapter
public WebMvcAutoConfigurationAdapter(WebProperties webProperties, WebMvcProperties mvcProperties, org.springframework.beans.factory.ListableBeanFactory beanFactory, org.springframework.beans.factory.ObjectProvider<HttpMessageConverters> messageConvertersProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.ResourceHandlerRegistrationCustomizer> resourceHandlerRegistrationCustomizerProvider, org.springframework.beans.factory.ObjectProvider<DispatcherServletPath> dispatcherServletPath, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.web.servlet.ServletRegistrationBean<?>> servletRegistrations)
-
-
Method Details
-
setServletContext
public void setServletContext(jakarta.servlet.ServletContext servletContext) - Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
configureMessageConverters
public void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) - Specified by:
configureMessageConvertersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureAsyncSupport
public void configureAsyncSupport(org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer configurer) - Specified by:
configureAsyncSupportin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configurePathMatch
public void configurePathMatch(org.springframework.web.servlet.config.annotation.PathMatchConfigurer configurer) - Specified by:
configurePathMatchin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureContentNegotiation
public void configureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer) - Specified by:
configureContentNegotiationin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
defaultViewResolver
@Bean @ConditionalOnMissingBean public org.springframework.web.servlet.view.InternalResourceViewResolver defaultViewResolver() -
beanNameViewResolver
@Bean @ConditionalOnBean(org.springframework.web.servlet.View.class) @ConditionalOnMissingBean public org.springframework.web.servlet.view.BeanNameViewResolver beanNameViewResolver() -
viewResolver
@Bean @ConditionalOnBean(org.springframework.web.servlet.ViewResolver.class) @ConditionalOnMissingBean(name="viewResolver", value=org.springframework.web.servlet.view.ContentNegotiatingViewResolver.class) public org.springframework.web.servlet.view.ContentNegotiatingViewResolver viewResolver(org.springframework.beans.factory.BeanFactory beanFactory) -
getMessageCodesResolver
public org.springframework.validation.MessageCodesResolver getMessageCodesResolver()- Specified by:
getMessageCodesResolverin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addFormatters
public void addFormatters(org.springframework.format.FormatterRegistry registry) - Specified by:
addFormattersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addResourceHandlers
public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) - Specified by:
addResourceHandlersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
requestContextFilter
@Bean @ConditionalOnMissingBean({org.springframework.web.context.request.RequestContextListener.class,org.springframework.web.filter.RequestContextFilter.class}) @ConditionalOnMissingFilterBean(org.springframework.web.filter.RequestContextFilter.class) public static org.springframework.web.filter.RequestContextFilter requestContextFilter()
-