File tree 1 file changed +9
-1
lines changed
spring-boot-docs/src/main/asciidoc
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
5421
5421
<<using-boot-structuring-your-code, structured your code>> in a sensible way your main
5422
5422
configuration is usually found.
5423
5423
5424
- NOTE: If you use a
5424
+ [NOTE]
5425
+ ====
5426
+ If you use a
5425
5427
<<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests, test
5426
5428
annotation to test a more specific slice of your application>> with such setup, you should
5427
5429
avoid adding configuration that are specific to a particular area on the
5428
5430
<<boot-features-testing-spring-boot-applications-testing-user-configuration, main's
5429
5431
application class>>.
5430
5432
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
+
5431
5439
If you want to customize the primary configuration, you can use a nested
5432
5440
`@TestConfiguration` class. Unlike a nested `@Configuration` class which would be used
5433
5441
instead of a your application's primary configuration, a nested `@TestConfiguration` class
You can’t perform that action at this time.
0 commit comments