WebMvcConfigurerAdapter常用的方法

1、addInterceptors:拦截器

2、addCorsMappings:跨域

3、addViewControllers:跳转指定页面

4、resourceViewResolver:视图解析器

5、configureMessageConverters:信息转换器

6、addResourceHandlers:静态资源

7、configureContentNegotiation:父类中已经定义好看可以为json输出

WebMvcConfigurerAdapter常用的方法

WebMvcConfigurerAdapter使用方式

1、过时方式:继承WebMvcConfigurerAdapter

2、现用方式

1)实现WebMvcConfigurer

2)现用方式:继承WebMvcConfigurationSupport

 

WebMvcConfigurerAdapter是什么

Spring内部的一种配置方式

采用JavaBean的形式来代替传统的xml配置文件形式进行针对框架个性化定制

相关文章:

  • 2021-10-10
  • 2021-12-31
  • 2022-01-03
  • 2021-11-26
  • 2021-12-18
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-09-08
  • 2021-10-05
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案