Order TaskExecution auto-config before TaskScheduling auto-config

See gh-15984
pull/16343/head
isank 6 years ago committed by Stephane Nicoll
parent 68e3de0357
commit e546ed4834

@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.task;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
@ -42,6 +43,7 @@ import org.springframework.scheduling.config.TaskManagementConfigUtils;
@ConditionalOnClass(ThreadPoolTaskScheduler.class) @ConditionalOnClass(ThreadPoolTaskScheduler.class)
@Configuration @Configuration
@EnableConfigurationProperties(TaskSchedulingProperties.class) @EnableConfigurationProperties(TaskSchedulingProperties.class)
@AutoConfigureAfter(TaskExecutionAutoConfiguration.class)
public class TaskSchedulingAutoConfiguration { public class TaskSchedulingAutoConfiguration {
@Bean @Bean

Loading…
Cancel
Save