diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java index 23d7b00f169..687a8cd8a92 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java @@ -583,6 +583,7 @@ public abstract class AnnotationUtils { for (Method method : methods) { if (method.getParameterTypes().length == 0 && method.getReturnType() != void.class) { try { + ReflectionUtils.makeAccessible(method); Object value = method.invoke(annotation); attrs.put(method.getName(), adaptValue(value, classValuesAsString, nestedAnnotationsAsMap)); }