diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java index 78538586930..52cf15866a8 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java @@ -90,7 +90,10 @@ import org.springframework.util.ReflectionUtils; * by the "context:annotation-config" and "context:component-scan" XML tags. * Remove or turn off the default annotation configuration there if you intend * to specify a custom AutowiredAnnotationBeanPostProcessor bean definition. - * + *
NOTE: Annotation injection will be performed before XML injection; thus + * the latter configuration will override the former for properties wired through + * both approaches. + * * @author Juergen Hoeller * @author Mark Fisher * @since 2.5 diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java index 1e4495d1aff..d981c811a5c 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java @@ -124,6 +124,9 @@ import org.springframework.util.StringUtils; * by the "context:annotation-config" and "context:component-scan" XML tags. * Remove or turn off the default annotation configuration there if you intend * to specify a custom CommonAnnotationBeanPostProcessor bean definition! + *
NOTE: Annotation injection will be performed before XML injection; thus
+ * the latter configuration will override the former for properties wired through
+ * both approaches.
*
* @author Juergen Hoeller
* @since 2.5
diff --git a/spring-framework-reference/src/beans.xml b/spring-framework-reference/src/beans.xml
index da2e2b19be8..e9befff368d 100644
--- a/spring-framework-reference/src/beans.xml
+++ b/spring-framework-reference/src/beans.xml
@@ -4438,7 +4438,14 @@ dataSource.url=jdbc:mysql:mydb