update 修复启动失败

This commit is contained in:
Guoqs
2025-12-23 15:03:37 +08:00
parent cc2011be18
commit 93912f1580
2 changed files with 16 additions and 12 deletions

View File

@@ -13,6 +13,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor;
@@ -35,7 +36,7 @@ public class ThreadPoolController {
@Autowired
@Qualifier("scheduledExecutorService")
private ScheduledThreadPoolExecutor scheduledExecutorService;
private ScheduledExecutorService scheduledExecutorService;
/**
* 获取所有线程池运行状态
@@ -52,7 +53,10 @@ public class ThreadPoolController {
poolInfoList.add(buildTaskExecutorInfo("thirdpartyTaskExecutor", "第三方推送线程池", thirdpartyTaskExecutor));
// 定时任务线程池
poolInfoList.add(buildScheduledExecutorInfo("scheduledExecutorService", "定时任务线程池", scheduledExecutorService));
if (scheduledExecutorService instanceof ScheduledThreadPoolExecutor) {
poolInfoList.add(buildScheduledExecutorInfo("scheduledExecutorService", "定时任务线程池",
(ScheduledThreadPoolExecutor) scheduledExecutorService));
}
return AjaxResult.success(poolInfoList);
}