|
28 | 28 | * {@link javax.inject.Inject} annotation, adding required-vs-optional semantics.
|
29 | 29 | *
|
30 | 30 | * <h3>Autowired Constructors</h3>
|
31 |
| - * <p>Only one constructor of any given bean class may declare this annotation with |
32 |
| - * the 'required' attribute set to {@code true}, indicating <i>the</i> constructor |
33 |
| - * to autowire when used as a Spring bean. Furthermore, if the 'required' attribute |
34 |
| - * is set to {@code true}, only a single constructor may be annotated with |
35 |
| - * {@code @Autowired}. If multiple <i>non-required</i> constructors declare the |
| 31 | + * <p>Only one constructor of any given bean class may declare this annotation with the |
| 32 | + * {@link #required} attribute set to {@code true}, indicating <i>the</i> constructor |
| 33 | + * to autowire when used as a Spring bean. Furthermore, if the {@code required} |
| 34 | + * attribute is set to {@code true}, only a single constructor may be annotated |
| 35 | + * with {@code @Autowired}. If multiple <i>non-required</i> constructors declare the |
36 | 36 | * annotation, they will be considered as candidates for autowiring. The constructor
|
37 | 37 | * with the greatest number of dependencies that can be satisfied by matching beans
|
38 | 38 | * in the Spring container will be chosen. If none of the candidates can be satisfied,
|
|
60 | 60 | * reference documentation for details).
|
61 | 61 | *
|
62 | 62 | * <h3>Multiple Arguments and 'required' Semantics</h3>
|
63 |
| - * <p>In the case of a multi-arg constructor or method, the 'required' parameter is |
64 |
| - * applicable to all arguments. Individual parameters may be declared as Java-8 style |
| 63 | + * <p>In the case of a multi-arg constructor or method, the {@link #required} attribute |
| 64 | + * is applicable to all arguments. Individual parameters may be declared as Java-8 style |
65 | 65 | * {@link java.util.Optional} or, as of Spring Framework 5.0, also as {@code @Nullable}
|
66 |
| - * or a not-null parameter type in Kotlin, overriding the base required semantics. |
| 66 | + * or a not-null parameter type in Kotlin, overriding the base 'required' semantics. |
67 | 67 | *
|
68 | 68 | * <h3>Autowiring Arrays, Collections, and Maps</h3>
|
69 | 69 | * <p>In case of an array, {@link java.util.Collection}, or {@link java.util.Map}
|
|
0 commit comments