mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 08:59:09 +00:00
Consistently accept "taskExecutor" bean of type Executor (as stated in @EnableAsync's javadoc)
Issue: SPR-15566
(cherry picked from commit 3cc94ae)
This commit is contained in:
+2
@@ -221,6 +221,7 @@ public class ScheduledAnnotationBeanPostProcessor
|
||||
this.registrar.setTaskScheduler(resolveSchedulerBean(TaskScheduler.class, false));
|
||||
}
|
||||
catch (NoUniqueBeanDefinitionException ex) {
|
||||
logger.debug("Could not find unique TaskScheduler bean", ex);
|
||||
try {
|
||||
this.registrar.setTaskScheduler(resolveSchedulerBean(TaskScheduler.class, true));
|
||||
}
|
||||
@@ -241,6 +242,7 @@ public class ScheduledAnnotationBeanPostProcessor
|
||||
this.registrar.setScheduler(resolveSchedulerBean(ScheduledExecutorService.class, false));
|
||||
}
|
||||
catch (NoUniqueBeanDefinitionException ex2) {
|
||||
logger.debug("Could not find unique ScheduledExecutorService bean", ex2);
|
||||
try {
|
||||
this.registrar.setScheduler(resolveSchedulerBean(ScheduledExecutorService.class, true));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user