
Spring MVC 5.0 框架中,弃用了
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
WebMvcConfigurerAdapter 推荐使用以下两种方式替用
方式一:继承org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
例如:
@Configuration
public class WebMvcConfg extends WebMvcConfigurationSupport {
//你的其他配置,重写方法后配置
}
方式二:直接实现接口org.springframework.web.servlet.config.annotation.WebMvcConfigurer
例如:
@Configuration
public class WebMvcConfg implements WebMvcConfigurer {
//你的具体实现及配置
}
版权申明:本文为博主原创文章,未经博主允许不得转载。
https://www.leftso.com/blog/720.html
时效提示:本文最后更新于【 2019-12-10 17:19:02 】,某些文章具有时效性,若有错误或已失效,请在下方留言。
时效提示:本文最后更新于【 2019-12-10 17:19:02 】,某些文章具有时效性,若有错误或已失效,请在下方留言。
评论区域
评论功能已关闭. 提示:评论功能虽已关闭,关闭之前的评论仍然会展示。