From c6b1f3865104e9eb2a7562fca70a71e86e19ef8e Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 25 Mar 2016 00:49:59 +0100 Subject: [PATCH] Support @Scheduled as a merged composable annotation Issue: SPR-13973 --- .../annotation/ScheduledAnnotationBeanPostProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java index c455380b2c..7089ee15ac 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java @@ -43,7 +43,7 @@ import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.core.MethodIntrospector; import org.springframework.core.Ordered; -import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.scheduling.TaskScheduler; import org.springframework.scheduling.Trigger; import org.springframework.scheduling.config.CronTask; @@ -258,7 +258,7 @@ public class ScheduledAnnotationBeanPostProcessor implements BeanPostProcessor, @Override public Set inspect(Method method) { Set scheduledMethods = - AnnotationUtils.getRepeatableAnnotations(method, Scheduled.class, Schedules.class); + AnnotatedElementUtils.getMergedRepeatableAnnotations(method, Scheduled.class, Schedules.class); return (!scheduledMethods.isEmpty() ? scheduledMethods : null); } });