Skip to content

Commit 98eaf05

Browse files
committed
@bean's "autowire" attribute does not affect annotation-driven autowiring
Issue: SPR-14282
1 parent 42bf007 commit 98eaf05

File tree

1 file changed

+7
-0
lines changed
  • spring-context/src/main/java/org/springframework/context/annotation

1 file changed

+7
-0
lines changed

spring-context/src/main/java/org/springframework/context/annotation/Bean.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@
198198

199199
/**
200200
* Are dependencies to be injected via convention-based autowiring by name or type?
201+
* <p>Note that this autowire mode is just about externally driven autowiring based
202+
* on bean property setter methods by convention, analogous to XML bean definitions.
203+
* <p>The default mode does allow for annotation-driven autowiring. "no" refers to
204+
* externally driven autowiring only, not affecting any autowiring demands that the
205+
* bean class itself expresses through annotations.
206+
* @see Autowire#BY_NAME
207+
* @see Autowire#BY_TYPE
201208
*/
202209
Autowire autowire() default Autowire.NO;
203210

0 commit comments

Comments
 (0)