From e546ed4834caadd5b40f555c9a4f5a6fef95fdfe Mon Sep 17 00:00:00 2001 From: isank Date: Mon, 18 Feb 2019 23:29:40 +0530 Subject: [PATCH 1/2] Order TaskExecution auto-config before TaskScheduling auto-config See gh-15984 --- .../autoconfigure/task/TaskSchedulingAutoConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java index f87ace5d99..b41045f9f9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java @@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.task; import java.util.concurrent.ScheduledExecutorService; import org.springframework.beans.factory.ObjectProvider; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -42,6 +43,7 @@ import org.springframework.scheduling.config.TaskManagementConfigUtils; @ConditionalOnClass(ThreadPoolTaskScheduler.class) @Configuration @EnableConfigurationProperties(TaskSchedulingProperties.class) +@AutoConfigureAfter(TaskExecutionAutoConfiguration.class) public class TaskSchedulingAutoConfiguration { @Bean From 42c246cacbea263bf7253b224215a09a8134f106 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 18 Feb 2019 21:18:51 +0100 Subject: [PATCH 2/2] Polish contribution Closes gh-15984 --- .../autoconfigure/task/TaskSchedulingAutoConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java index b41045f9f9..ad072bee02 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 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.