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 bf445cc119..59300cdf72 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -5421,13 +5421,21 @@ 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 +[NOTE] +==== +If you use a <> with such setup, you should avoid adding configuration that are specific to a particular area on the <>. +The underlying component scan configuration of `@SpringBootApplication` defines exclude +filters that are used to make sure slicing works as expected. If you are using an explicit +`@ComponentScan` directive on your `@SpringBootApplication`-annoted class, be aware that +those filters will be disabled. If you are using slicing, you should define them again. +==== + 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 a your application's primary configuration, a nested `@TestConfiguration` class