标签:let 全面 ase ann springmvc targe figure map except
Spring Boot官方文档描述
If you want to keep Spring Boot MVC features and you want to add additional MVC configuration (interceptors, formatters, view controllers, and other features), you can add your own @Configuration
class of type WebMvcConfigurer
but without @EnableWebMvc
. If you wish to provide custom instances of RequestMappingHandlerMapping
, RequestMappingHandlerAdapter
, or ExceptionHandlerExceptionResolver
, you can declare a WebMvcRegistrationsAdapter
instance to provide such components.
If you want to take complete control of Spring MVC, you can add your own @Configuration
annotated with @EnableWebMvc
.
原来的SpringMVC配置方式:
<mvc:view-controller path="/hello" view-name="success"/> <mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/hello"/> <bean></bean> </mvc:interceptor> </mvc:interceptors>
现在的SpringBoot方式:
add your own @Configuration
class of type WebMvcConfigurer
but without @EnableWebMvc
标签:let 全面 ase ann springmvc targe figure map except
原文地址:https://www.cnblogs.com/guchunchao/p/9903522.html