Merge branch '2.7.x' into 3.0.x
Closes gh-38017
This commit is contained in:
@@ -45,6 +45,8 @@ In addition to Spring MVC's defaults, the auto-configuration provides the follow
|
||||
If you want to keep those Spring Boot MVC customizations and make more {spring-framework-docs}/web.html#mvc[MVC customizations] (interceptors, formatters, view controllers, and other features), you can add your own `@Configuration` class of type `WebMvcConfigurer` but *without* `@EnableWebMvc`.
|
||||
|
||||
If you want to provide custom instances of `RequestMappingHandlerMapping`, `RequestMappingHandlerAdapter`, or `ExceptionHandlerExceptionResolver`, and still keep the Spring Boot MVC customizations, you can declare a bean of type `WebMvcRegistrations` and use it to provide custom instances of those components.
|
||||
The custom instances will be subject to further initialization and configuration by Spring MVC.
|
||||
To participate in, and if desired, override that subsequent processing, a `WebMvcConfigurer` should be used.
|
||||
|
||||
If you do not want to use the auto-configuration and want to take complete control of Spring MVC, add your own `@Configuration` annotated with `@EnableWebMvc`.
|
||||
Alternatively, add your own `@Configuration`-annotated `DelegatingWebMvcConfiguration` as described in the Javadoc of `@EnableWebMvc`.
|
||||
|
||||
Reference in New Issue
Block a user