diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java index 40c25fa2..22fbd84c 100644 --- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java +++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java @@ -44,6 +44,7 @@ import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.SmartLifecycle; +import org.springframework.core.Ordered; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; @@ -75,7 +76,8 @@ import org.springframework.util.StringUtils; * @author Michael Minella * @author Glenn Renfro */ -public class TaskLifecycleListener implements ApplicationListener, SmartLifecycle, DisposableBean { +public class TaskLifecycleListener implements ApplicationListener, + SmartLifecycle, DisposableBean, Ordered { @Autowired private ConfigurableApplicationContext context; @@ -408,4 +410,9 @@ public class TaskLifecycleListener implements ApplicationListener