diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java index e4554b24e6..0d80658fc8 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java @@ -189,7 +189,7 @@ public class AnnotatedElementUtils { public static AnnotationAttributes findAnnotationAttributes(AnnotatedElement element, Class annotationType) { Assert.notNull(annotationType, "annotationType must not be null"); - return findAnnotationAttributes(element, annotationType.getName(), true, true, true, true, false, false); + return findAnnotationAttributes(element, annotationType.getName()); } /** @@ -209,7 +209,7 @@ public class AnnotatedElementUtils { * not found */ public static AnnotationAttributes findAnnotationAttributes(AnnotatedElement element, String annotationType) { - return findAnnotationAttributes(element, annotationType, true, true, true, true, false, false); + return findAnnotationAttributes(element, annotationType, false, false); } /** @@ -697,6 +697,14 @@ public class AnnotatedElementUtils { } } + /** + * {@link Processor} that gets the {@code AnnotationAttributes} for the + * target annotation during the {@link #process} phase and then merges + * annotation attributes from lower levels in the annotation hierarchy + * during the {@link #postProcess} phase. + * @see AnnotationUtils#getAnnotationAttributes(Annotation) + * @since 4.2 + */ private static class MergeAnnotationAttributesProcessor implements Processor { private final boolean classValuesAsString;