From c96fbc66ec97d88baf95a75fa18092ccfc3f416c Mon Sep 17 00:00:00 2001 From: zhangchao <zc857179121@qq.com> Date: 星期一, 26 八月 2024 20:08:43 +0800 Subject: [PATCH] 偶发bug(任务号丢失) --- src/main/java/com/zy/core/ServerBootstrap.java | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java index c7c8a21..d9f526d 100644 --- a/src/main/java/com/zy/core/ServerBootstrap.java +++ b/src/main/java/com/zy/core/ServerBootstrap.java @@ -12,6 +12,7 @@ import com.zy.core.thread.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.DependsOn; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -26,6 +27,7 @@ */ @Slf4j @Component +@DependsOn("springContextUtil") public class ServerBootstrap { @Autowired @@ -41,6 +43,7 @@ */ @PostConstruct @Async + @DependsOn("basDevpService") public void init() throws InterruptedException { News.info("鏍稿績鎺у埗灞傚紑濮嬪垵濮嬪寲..............................................."); Thread.sleep(2000); -- Gitblit v1.9.1