@Bean's "autowire" attribute does not affect annotation-driven autowiring

Issue: SPR-14282
This commit is contained in:
Juergen Hoeller 2016-05-29 13:19:09 +02:00
parent 42bf007604
commit 98eaf05c8f
1 changed files with 7 additions and 0 deletions

View File

@ -198,6 +198,13 @@ public @interface Bean {
/**
* Are dependencies to be injected via convention-based autowiring by name or type?
* <p>Note that this autowire mode is just about externally driven autowiring based
* on bean property setter methods by convention, analogous to XML bean definitions.
* <p>The default mode does allow for annotation-driven autowiring. "no" refers to
* externally driven autowiring only, not affecting any autowiring demands that the
* bean class itself expresses through annotations.
* @see Autowire#BY_NAME
* @see Autowire#BY_TYPE
*/
Autowire autowire() default Autowire.NO;