Skip to content

Commit 6a6b441

Browse files
committed
Document annotation-config / component-scan tip
Document that the <context:annotation-config> element is usually not required when using <context:component-scan>. Issue: SPR-9808
1 parent a263fd3 commit 6a6b441

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/reference/docbook/beans-classpath-scanning.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ public class JpaMovieFinder implements MovieFinder {
121121

122122
&lt;/beans&gt;</programlisting>
123123

124+
<tip>
125+
<para>The use of <literal>&lt;context:component-scan&gt;</literal> implicitly
126+
enables the functionality of <literal>&lt;context:annotation-config&gt;</literal>.
127+
There is usually no need to include the <literal>&lt;context:annotation-config&gt;</literal>
128+
element when using <literal>&lt;context:component-scan&gt;</literal>.
129+
</para>
130+
</tip>
124131
<note>
125132
<para>The scanning of classpath packages requires the presence of
126133
corresponding directory entries in the classpath. When you build JARs

0 commit comments

Comments
 (0)