+ clarify order of annotation and XML injection

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2934 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Costin Leau 2010-02-09 11:17:07 +00:00
parent 229c393702
commit b443d3ad7a
3 changed files with 15 additions and 2 deletions

View File

@ -90,7 +90,10 @@ import org.springframework.util.ReflectionUtils;
* by the "context:annotation-config" and "context:component-scan" XML tags. * by the "context:annotation-config" and "context:component-scan" XML tags.
* Remove or turn off the default annotation configuration there if you intend * Remove or turn off the default annotation configuration there if you intend
* to specify a custom AutowiredAnnotationBeanPostProcessor bean definition. * to specify a custom AutowiredAnnotationBeanPostProcessor bean definition.
* * <p><b>NOTE:</b> Annotation injection will be performed <i>before</i> XML injection; thus
* the latter configuration will override the former for properties wired through
* both approaches.
*
* @author Juergen Hoeller * @author Juergen Hoeller
* @author Mark Fisher * @author Mark Fisher
* @since 2.5 * @since 2.5

View File

@ -124,6 +124,9 @@ import org.springframework.util.StringUtils;
* by the "context:annotation-config" and "context:component-scan" XML tags. * by the "context:annotation-config" and "context:component-scan" XML tags.
* Remove or turn off the default annotation configuration there if you intend * Remove or turn off the default annotation configuration there if you intend
* to specify a custom CommonAnnotationBeanPostProcessor bean definition! * to specify a custom CommonAnnotationBeanPostProcessor bean definition!
* <p><b>NOTE:</b> Annotation injection will be performed <i>before</i> XML injection; thus
* the latter configuration will override the former for properties wired through
* both approaches.
* *
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 2.5 * @since 2.5

View File

@ -4438,7 +4438,14 @@ dataSource.url=jdbc:mysql:mydb</programlisting>
<literal>@Qualifier, @Named, and @Provider</literal> if the JSR330 jar is <literal>@Qualifier, @Named, and @Provider</literal> if the JSR330 jar is
present on the classpath. Use of these annotations also requires that present on the classpath. Use of these annotations also requires that
certain <interfacename>BeanPostProcessors</interfacename> be registered certain <interfacename>BeanPostProcessors</interfacename> be registered
within the Spring container. As always, you can register them as within the Spring container.
<note>Annotation injection is performed <emphasis>before</emphasis> XML injection, thus
the latter configuration will override the former for properties wired
through both approaches.
</note>
As always, you can register them as
individual bean definitions, but they can also be implicitly registered by individual bean definitions, but they can also be implicitly registered by
including the following tag in an XML-based Spring configuration (notice including the following tag in an XML-based Spring configuration (notice
the inclusion of the <literal>context</literal> namespace):</para> the inclusion of the <literal>context</literal> namespace):</para>