Browse Source

Fix documentation on extending Spring MVC

When extending `WebMvcConfigurerAdapter`, developers should always
declare those as `@Configuration` classes rather than `@Bean`s, which
can lead to dependency issues as described in #6853.

Fixes gh-6853
pull/6776/merge
Brian Clozel 9 years ago
parent
commit
f0259c82de
  1. 2
      spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

2
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

@ -1598,7 +1598,7 @@ The auto-configuration adds the following features on top of Spring's defaults:
If you want to keep Spring Boot MVC features, and If you want to keep Spring Boot MVC features, and
you just want to add additional {spring-reference}#mvc[MVC configuration] (interceptors, you just want to add additional {spring-reference}#mvc[MVC configuration] (interceptors,
formatters, view controllers etc.) you can add your own `@Bean` of type formatters, view controllers etc.) you can add your own `@Configuration` class of type
`WebMvcConfigurerAdapter`, but *without* `@EnableWebMvc`. If you wish to provide custom `WebMvcConfigurerAdapter`, but *without* `@EnableWebMvc`. If you wish to provide custom
instances of `RequestMappingHandlerMapping`, `RequestMappingHandlerAdapter` or instances of `RequestMappingHandlerMapping`, `RequestMappingHandlerAdapter` or
`ExceptionHandlerExceptionResolver` you can declare a `WebMvcRegistrationsAdapter` `ExceptionHandlerExceptionResolver` you can declare a `WebMvcRegistrationsAdapter`

Loading…
Cancel
Save