File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
spring-boot-docs/src/main/asciidoc Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -5421,13 +5421,21 @@ The search algorithm works up from the package that contains the test until it f
54215421<<using-boot-structuring-your-code, structured your code>> in a sensible way your main
54225422configuration is usually found.
54235423
5424- NOTE: If you use a
5424+ [NOTE]
5425+ ====
5426+ If you use a
54255427<<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests, test
54265428annotation to test a more specific slice of your application>> with such setup, you should
54275429avoid adding configuration that are specific to a particular area on the
54285430<<boot-features-testing-spring-boot-applications-testing-user-configuration, main's
54295431application class>>.
54305432
5433+ The underlying component scan configuration of `@SpringBootApplication` defines exclude
5434+ filters that are used to make sure slicing works as expected. If you are using an explicit
5435+ `@ComponentScan` directive on your `@SpringBootApplication`-annoted class, be aware that
5436+ those filters will be disabled. If you are using slicing, you should define them again.
5437+ ====
5438+
54315439If you want to customize the primary configuration, you can use a nested
54325440`@TestConfiguration` class. Unlike a nested `@Configuration` class which would be used
54335441instead of a your application's primary configuration, a nested `@TestConfiguration` class
You can’t perform that action at this time.
0 commit comments