From 70bf1a48d037f993021ddf4ee2ee6da3bbce351e Mon Sep 17 00:00:00 2001 From: 司猫子 <songshuang@qq.com> Date: 星期日, 04 二月 2024 09:51:52 +0800 Subject: [PATCH] !481 单元格合并可以基于注解选择哪些其他字段需要同时相等方可进行该单元格合并 * excel插件 原有的合并策略写死了根据前一字段是否一致来判断后一字段的合并 感觉这样不灵活 如有特殊需求 字段排序不规整 于是扩充了注解的… --- ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/AsyncConfig.java | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/AsyncConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/AsyncConfig.java index de9a9bc..66eea66 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/AsyncConfig.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/config/AsyncConfig.java @@ -2,36 +2,32 @@ import cn.hutool.core.util.ArrayUtil; import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.SpringUtils; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.AsyncConfigurer; -import org.springframework.scheduling.annotation.EnableAsync; import java.util.Arrays; import java.util.concurrent.Executor; -import java.util.concurrent.ScheduledExecutorService; /** * 寮傛閰嶇疆 + * <p> + * 濡傛灉鏈娇鐢ㄨ櫄鎷熺嚎绋嬪垯鐢熸晥 * * @author Lion Li */ -@EnableAsync(proxyTargetClass = true) +@ConditionalOnProperty(prefix = "spring.threads.virtual", name = "enabled", havingValue = "false") @AutoConfiguration public class AsyncConfig implements AsyncConfigurer { - - @Autowired - @Qualifier("scheduledExecutorService") - private ScheduledExecutorService scheduledExecutorService; /** * 鑷畾涔� @Async 娉ㄨВ浣跨敤绯荤粺绾跨▼姹� */ @Override public Executor getAsyncExecutor() { - return scheduledExecutorService; + return SpringUtils.getBean("scheduledExecutorService"); } /** -- Gitblit v1.9.3