diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java b/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java index 8a9a971748..8c33d8cbf1 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java @@ -60,8 +60,8 @@ import java.lang.annotation.Target; *
  • Aliases within an annotation: *
      *
    1. Each attribute that makes up an aliased pair must be annotated with - * {@code @AliasFor}, and the {@link #attribute} must reference the - * other attribute in the pair.
    2. + * {@code @AliasFor}, and either the {@link #attribute} or the {@link #value} + * attribute must reference the other attribute in the pair. *
    3. Aliased attributes must declare the same return type.
    4. *
    5. Aliased attributes must declare a default value.
    6. *
    7. Aliased attributes must declare the same default value.
    8. @@ -84,10 +84,10 @@ import java.lang.annotation.Target; *

      Example: Aliases within an Annotation

      *
       public @interface ContextConfiguration {
        *
      - *    @AliasFor(attribute = "locations")
      + *    @AliasFor("locations")
        *    String[] value() default {};
        *
      - *    @AliasFor(attribute = "value")
      + *    @AliasFor("value")
        *    String[] locations() default {};
        *
        *    // ...