From eb16b9e6a0abca429a1e916e90a5df3afe0f960d Mon Sep 17 00:00:00 2001 From: Lionel <12719401+wisdom_woods@user.noreply.gitee.com> Date: 星期三, 09 八月 2023 10:47:25 +0800 Subject: [PATCH] !410 将部门管理 负责人选项改为下拉框选择 从当前部门的用户列表选择一个人做绑定 后端接收用户ID #I7R8CI * 将部门管理 负责人选项改为下拉框选择 --- ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/ThreadPoolConfig.java | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/ThreadPoolConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/ThreadPoolConfig.java index cb3d8f7..3db62b2 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/ThreadPoolConfig.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/ThreadPoolConfig.java @@ -1,8 +1,11 @@ package org.dromara.common.core.config; -import org.dromara.common.core.config.properties.ThreadPoolProperties; -import org.dromara.common.core.utils.Threads; +import jakarta.annotation.PreDestroy; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.concurrent.BasicThreadFactory; +import org.dromara.common.core.config.properties.ThreadPoolProperties; +import org.dromara.common.core.utils.SpringUtils; +import org.dromara.common.core.utils.Threads; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -18,6 +21,7 @@ * * @author Lion Li **/ +@Slf4j @AutoConfiguration @EnableConfigurationProperties(ThreadPoolProperties.class) public class ThreadPoolConfig { @@ -54,4 +58,19 @@ } }; } + + /** + * 閿�姣佷簨浠� + */ + @PreDestroy + public void destroy() { + try { + log.info("====鍏抽棴鍚庡彴浠诲姟浠诲姟绾跨▼姹�===="); + ScheduledExecutorService scheduledExecutorService = SpringUtils.getBean("scheduledExecutorService"); + Threads.shutdownAndAwaitTermination(scheduledExecutorService); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + } + } -- Gitblit v1.9.3