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 a78850faa2..f6d3e9906e 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 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 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. @@ -55,12 +55,12 @@ import org.springframework.util.StringValueResolver; * to the "fixedRate", "fixedDelay", or "cron" expression provided via the annotation. * *
This post-processor is automatically registered by Spring's
- * {@code Auto-detects any {@link SchedulingConfigurer} instances in the container,
- * allowing for customization of the scheduler to be used or for fine-grained control
- * over task registration (e.g. registration of {@link Trigger} tasks.
+ * Autodetects any {@link SchedulingConfigurer} instances in the container,
+ * allowing for customization of the scheduler to be used or for fine-grained
+ * control over task registration (e.g. registration of {@link Trigger} tasks.
* See the @{@link EnableScheduling} javadocs for complete usage details.
*
* @author Mark Fisher
@@ -154,9 +154,9 @@ public class ScheduledAnnotationBeanPostProcessor
}
public Object postProcessAfterInitialization(final Object bean, String beanName) {
- if (!this.nonAnnotatedClasses.containsKey(bean.getClass())) {
+ Class> targetClass = AopUtils.getTargetClass(bean);
+ if (!this.nonAnnotatedClasses.containsKey(targetClass)) {
final Set