Skip to content

Commit 95ab801

Browse files
authored
Update 27.1.1. Spring MVC auto-configuration.md
1 parent 705fd0e commit 95ab801

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IV. Spring Boot features/27.1.1. Spring MVC auto-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Spring Boot为Spring MVC提供的auto-configuration适用于大多数应用,
1111
7. 对自定义`Favicon`的支持。
1212
8. 自动使用`ConfigurableWebBindingInitializer` bean。
1313

14-
如果保留Spring Boot MVC特性,你只需添加其他的[MVC配置](http://docs.spring.io/spring/docs/4.3.3.RELEASE/spring-framework-reference/htmlsingle#mvc)(拦截器,格式化处理器,视图控制器等)。你可以添加自己的`WebMvcConfigurerAdapter`类型的`@Configuration`类,而不需要注解`@EnableWebMvc`。如果希望使用自定义的`RequestMappingHandlerMapping``RequestMappingHandlerAdapter`,或`xceptionHandlerExceptionResolver`,你可以声明一个`WebMvcRegistrationsAdapter`实例提供这些组件。
14+
如果保留Spring Boot MVC特性,你只需添加其他的[MVC配置](http://docs.spring.io/spring/docs/4.3.3.RELEASE/spring-framework-reference/htmlsingle#mvc)(拦截器,格式化处理器,视图控制器等)。你可以添加自己的`WebMvcConfigurerAdapter`类型的`@Configuration`类,而不需要注解`@EnableWebMvc`。如果希望使用自定义的`RequestMappingHandlerMapping``RequestMappingHandlerAdapter`,或`ExceptionHandlerExceptionResolver`,你可以声明一个`WebMvcRegistrationsAdapter`实例提供这些组件。
1515

1616

1717
如果想全面控制Spring MVC,你可以添加自己的`@Configuration`,并使用`@EnableWebMvc`注解。

0 commit comments

Comments
 (0)