Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
584d2de9
Commit
584d2de9
authored
Jun 06, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document use of component scan exclude filters on SpringBootApplication
Closes gh-10933
parent
d0b71a7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
spring-boot-features.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+9
-1
No files found.
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
584d2de9
...
...
@@ -5421,13 +5421,21 @@ The search algorithm works up from the package that contains the test until it f
<<using-boot-structuring-your-code, structured your code>> in a sensible way your main
configuration is usually found.
NOTE: If you use a
[NOTE]
====
If you use a
<<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests, test
annotation to test a more specific slice of your application>> with such setup, you should
avoid adding configuration that are specific to a particular area on the
<<boot-features-testing-spring-boot-applications-testing-user-configuration, main's
application class>>.
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment