diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 08f1623ad2..44ed3bc5b5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -5651,6 +5651,12 @@ The search algorithm works up from the package that contains the test until it f <> in a sensible way your main configuration is usually found. +NOTE: If you use a <> with such setup, any +user configuration defined on your `@SpringBootApplication` will be processed. This can +break the purpose of slicing and it is recommended to move such configuration to a +`@Configuration` class alongside your `@SpringBootApplication`. + If you want to customize the primary configuration, you can use a nested `@TestConfiguration` class. Unlike a nested `@Configuration` class which would be used instead of your application's primary configuration, a nested `@TestConfiguration` class