From f0259c82de4f68de69cfa0fd8c20a18f49ea494c Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 9 Sep 2016 09:45:54 +0200 Subject: [PATCH] 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 --- spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index baab5859202..6f1d38a4883 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/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 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 instances of `RequestMappingHandlerMapping`, `RequestMappingHandlerAdapter` or `ExceptionHandlerExceptionResolver` you can declare a `WebMvcRegistrationsAdapter`