From e2efe712d2dc6593a03f71c6213f63a04437c3e7 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期五, 20 九月 2024 16:04:10 +0800 Subject: [PATCH] 显示设备详情 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/config/DynamicSchedulingConfig.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/config/DynamicSchedulingConfig.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/config/DynamicSchedulingConfig.java index cb26597..8581e52 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/config/DynamicSchedulingConfig.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/config/DynamicSchedulingConfig.java @@ -10,6 +10,8 @@ import javax.annotation.Resource; import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; @Configuration @EnableScheduling @@ -21,6 +23,8 @@ public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { DynamicSchedulingConfig.static_scheduledTaskRegistrar = taskRegistrar; - taskRegistrar.setScheduler(Executors.newScheduledThreadPool(1)); + ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1); + scheduledThreadPoolExecutor.setRemoveOnCancelPolicy(true); + taskRegistrar.setScheduler(scheduledThreadPoolExecutor); } } -- Gitblit v1.9.3