Polish Javadoc for @Autowired

See gh-23263
master
Sam Brannen 5 years ago
parent 817f689584
commit b774147db4
  1. 16
      spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java

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

Loading…
Cancel
Save