码迷,mamicode.com
首页 > 编程语言 > 详细

Springboot对SpringMVC如何扩展配置

时间:2019-12-06 13:14:07      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:ges   editor   c中   data-   -o   html   ted   plugin   div   

原文地址:http://www.javayihao.top/detail/171

概述

Springboot在web层的开发基本都是采用Springmvc框架技术,但是Springmvc中的某些配置在boot是没有的,我们就应该根据自己的需求进行对mvc扩展配置

Springboot1.x版本如何配置

通过注解@Configuration一个类,继承webmvcconfigureradapter,然后根据需求实现里面的方法。
技术图片

Springboot2.x版本如何配置

通过实现webmvcconfigure接口的方式

技术图片

上面boot对mvc的扩展配置既保留了mvc的默认配置,也可以使用我们扩展的配置。如何全面接管mvc的配置,所以的webmvc都由我们自己配置?只需要加上注解EnableWebMvc

技术图片技术图片?
 
技术图片

Springboot对SpringMVC如何扩展配置

标签:ges   editor   c中   data-   -o   html   ted   plugin   div   

原文地址:https://www.cnblogs.com/javayihao/p/11994400.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!