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 2a875b0476..88c52ebf01 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 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,8 @@ import java.lang.annotation.Target; *
    *
  1. The attribute that is an alias for an attribute in a meta-annotation * must be annotated with {@code @AliasFor}, and {@link #attribute} must - * reference the attribute in the meta-annotation.
  2. + * reference the attribute in the meta-annotation (unless both attributes have + * the same name). *
  3. Aliased attributes must declare the same return type.
  4. *
  5. {@link #annotation} must reference the meta-annotation.
  6. *
  7. The referenced meta-annotation must be meta-present on the @@ -191,6 +192,8 @@ public @interface AliasFor { /** * The name of the attribute that this attribute is an alias for. + *

    May be omitted if this attribute is an alias for an attribute in a + * meta-annotation and both attributes have the same name. * @see #value */ @AliasFor("value")