Polishing

This commit is contained in:
Sam Brannen 2017-11-28 14:11:21 +01:00
parent f2e8171bfb
commit 773cd3241b
3 changed files with 7 additions and 7 deletions

View File

@ -78,7 +78,7 @@ import org.springframework.core.annotation.AliasFor;
* </pre>
*
* The semantics of the above-mentioned annotations match their use at the component
* class level: {@code Profile} allows for selective inclusion of certain beans.
* class level: {@code @Profile} allows for selective inclusion of certain beans.
* {@code @Scope} changes the bean's scope from singleton to the specified scope.
* {@code @Lazy} only has an actual effect in case of the default singleton scope.
* {@code @DependsOn} enforces the creation of specific other beans before this
@ -96,12 +96,12 @@ import org.springframework.core.annotation.AliasFor;
* order values determine the order of resolved elements in case of collection
* injection points (with several target beans matching by type and qualifier).
*
* <p><b>NOTE:</b> {@code @Order} values may influence priorities at injection points
* <p><b>NOTE:</b> {@code @Order} values may influence priorities at injection points,
* but please be aware that they do not influence singleton startup order which is an
* orthogonal concern determined by dependency relationships and {@code @DependsOn}
* declarations as mentioned above. Also, {@link javax.annotation.Priority} is not
* available at this level since it cannot be declared on methods; its semantics can
* be modelled through {@code @Order} values in combination with {@code @Primary} on
* be modeled through {@code @Order} values in combination with {@code @Primary} on
* a single bean per type.
*
* <h3>{@code @Bean} Methods in {@code @Configuration} Classes</h3>

View File

@ -42,7 +42,7 @@ import org.springframework.core.Ordered;
*
* <p>Since Spring 4.1, the standard {@link javax.annotation.Priority} annotation
* can be used as a drop-in replacement for this annotation in ordering scenarios.
* Note that {@code Priority} may have additional semantics when a single element
* Note that {@code @Priority} may have additional semantics when a single element
* has to be picked (see {@link AnnotationAwareOrderComparator#getPriority}).
*
* <p>Alternatively, order values may also be determined on a per-instance basis

View File

@ -4438,17 +4438,17 @@ The same applies for typed collections:
====
Your target beans can implement the `org.springframework.core.Ordered` interface or use
the `@Order` or standard `@Priority` annotation if you want items in the array or list
to be sorted into a specific order. Otherwise their order will follow the registration
to be sorted in a specific order. Otherwise their order will follow the registration
order of the corresponding target bean definitions in the container.
The `@Order` annotation may be declared at target class level but also on `@Bean` methods,
potentially being very individual per bean definition (in case of multiple definitions
with the same bean class). `@Order` values may influence priorities at injection points
with the same bean class). `@Order` values may influence priorities at injection points,
but please be aware that they do not influence singleton startup order which is an
orthogonal concern determined by dependency relationships and `@DependsOn` declarations.
Note that the standard `javax.annotation.Priority` annotation is not available at the
`@Bean` level since it cannot be declared on methods. Its semantics can be modelled
`@Bean` level since it cannot be declared on methods. Its semantics can be modeled
through `@Order` values in combination with `@Primary` on a single bean per type.
====