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
3a6d15ac
Commit
3a6d15ac
authored
Feb 12, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Caution against using component scanning in an auto-configuration
Closes gh-15348
parent
8e6b4629
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+8
-7
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
3a6d15ac
...
@@ -8072,6 +8072,14 @@ published jar. The file should list your configuration classes under the
...
@@ -8072,6 +8072,14 @@ published jar. The file should list your configuration classes under the
com.mycorp.libx.autoconfigure.LibXWebAutoConfiguration
com.mycorp.libx.autoconfigure.LibXWebAutoConfiguration
----
----
[NOTE]
====
Auto-configurations must be loaded that way _only_. Make sure that they are defined in
a specific package space and that they are never the target of component scanning.
Futhermore, auto-configuration classes should not enable component scanning to find
additional components. Specific `@Import`s should be used instead.
====
You can use the
You can use the
{sc-spring-boot-autoconfigure}/AutoConfigureAfter.{sc-ext}[`@AutoConfigureAfter`] or
{sc-spring-boot-autoconfigure}/AutoConfigureAfter.{sc-ext}[`@AutoConfigureAfter`] or
{sc-spring-boot-autoconfigure}/AutoConfigureBefore.{sc-ext}[`@AutoConfigureBefore`]
{sc-spring-boot-autoconfigure}/AutoConfigureBefore.{sc-ext}[`@AutoConfigureBefore`]
...
@@ -8084,13 +8092,6 @@ knowledge of each other, you can also use `@AutoConfigureOrder`. That annotation
...
@@ -8084,13 +8092,6 @@ knowledge of each other, you can also use `@AutoConfigureOrder`. That annotation
same semantic as the regular `@Order` annotation but provides a dedicated order for
same semantic as the regular `@Order` annotation but provides a dedicated order for
auto-configuration classes.
auto-configuration classes.
[NOTE]
====
Auto-configurations must be loaded that way _only_. Make sure that they are defined in
a specific package space and that, in particular, they are never the target of component
scanning.
====
[[boot-features-condition-annotations]]
[[boot-features-condition-annotations]]
...
...
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