File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
spring-boot-docs/src/main/asciidoc Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -5398,6 +5398,12 @@ The search algorithm works up from the package that contains the test until it f
5398
5398
<<using-boot-structuring-your-code, structured your code>> in a sensible way your main
5399
5399
configuration is usually found.
5400
5400
5401
+ NOTE: If you use a <<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests,
5402
+ test annotation to test a more specific slice of your application>> with such setup, any
5403
+ user configuration defined on your `@SpringBootApplication` will be processed. This can
5404
+ break the purpose of slicing and it is recommended to move such configuration to a
5405
+ `@Configuration` class alongside your `@SpringBootApplication`.
5406
+
5401
5407
If you want to customize the primary configuration, you can use a nested
5402
5408
`@TestConfiguration` class. Unlike a nested `@Configuration` class which would be used
5403
5409
instead of a your application's primary configuration, a nested `@TestConfiguration` class
You can’t perform that action at this time.
0 commit comments