@Configuration public class WebConfig extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
| 限定符和类型 | 方法和说明 |
|---|---|
ActionInterceptor |
actionInterceptor() |
void |
addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
增加对rest api鉴权的spring mvc拦截器
|
void |
addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) |
void |
addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
设置默认首页
|
com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator |
beanTypeAutoProxyCreator()
druid数据库连接池监控
|
void |
configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
解决com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException 问题,提交实体不存在的字段异常
|
ExecutorService |
crawlExecutorPool() |
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter |
mappingJackson2HttpMessageConverter() |
org.springframework.boot.web.servlet.ServletListenerRegistrationBean<org.springframework.web.context.request.RequestContextListener> |
requestContextListenerRegistration()
RequestContextListener注册
|
org.springframework.boot.web.servlet.FilterRegistrationBean |
xssFilterRegistration() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addCorsMappings, addFormatters, addReturnValueHandlers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator@Bean public ActionInterceptor actionInterceptor()
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
addInterceptors 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerpublic void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
addResourceHandlers 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurer@Bean public com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator beanTypeAutoProxyCreator()
@Bean public org.springframework.boot.web.servlet.FilterRegistrationBean xssFilterRegistration()
@Bean public org.springframework.boot.web.servlet.ServletListenerRegistrationBean<org.springframework.web.context.request.RequestContextListener> requestContextListenerRegistration()
public void addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry)
addViewControllers 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerpublic void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
configureMessageConverters 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurer@Bean public org.springframework.http.converter.json.MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter()
@Bean public ExecutorService crawlExecutorPool()
Copyright © 2021. All rights reserved.