From fc34d7f3b8f837f3fcb2f329902751489dd5b106 Mon Sep 17 00:00:00 2001 From: cbs <18617195505@163.com> Date: Mon, 16 Jun 2025 14:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/schedul/ThreeDimensionalScheduled.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/schedul/ThreeDimensionalScheduled.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/schedul/ThreeDimensionalScheduled.java index 97d55f92a..e837a8a27 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/schedul/ThreeDimensionalScheduled.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/schedul/ThreeDimensionalScheduled.java @@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.system.util.redis.RedisUtil; import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.Resource; @@ -22,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; @EnableScheduling @Component @@ -40,7 +42,7 @@ public class ThreeDimensionalScheduled { private static final ExecutorService fixedThreadPool = Executors.newFixedThreadPool(3); // 这个方法将每200毫秒执行一次 -// @Scheduled(fixedDelay = 300, timeUnit = TimeUnit.MILLISECONDS) + @Scheduled(fixedDelay = 300, timeUnit = TimeUnit.MILLISECONDS) public void executeTask() { fixedThreadPool.execute(new Runnable() { @Override