@Configuration
@EnableWebMvc
@ComponentScan(basePackages="com.publiccms.controller.web",
useDefaultFilters=false,
includeFilters=)
public class WebConfig
extends org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
Constructor and Description |
---|
WebConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) |
org.springframework.web.servlet.ViewResolver |
defaultWebViewResolver()
视图层解析器
|
org.springframework.web.servlet.LocaleResolver |
localeResolver(org.springframework.core.env.Environment env) |
WebContextInterceptor |
webInitializingInterceptor()
拦截器
|
WebFreeMarkerViewResolver |
webViewResolver(TemplateComponent templateComponent)
视图层解析器
|
addArgumentResolvers, addCorsMappings, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
@Bean public org.springframework.web.servlet.LocaleResolver localeResolver(org.springframework.core.env.Environment env)
@Bean public org.springframework.web.servlet.ViewResolver defaultWebViewResolver()
@Bean public WebFreeMarkerViewResolver webViewResolver(TemplateComponent templateComponent)
templateComponent
- @Bean public WebContextInterceptor webInitializingInterceptor()
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
addInterceptors
in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addInterceptors
in class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
Copyright © 2018. All rights reserved.