From ba1a540add437649bae209ba8a8b44f2e2d95451 Mon Sep 17 00:00:00 2001 From: dhb52 <dhb52@126.com> Date: 星期五, 24 五月 2024 13:30:51 +0800 Subject: [PATCH] !542 更新SnailJob版本到1.0.0-beta2 * feat: 配置项变更,避免误解snail-job.group-name => snail-job.group * chore: 更新snail-job版本到1.0.0-beta2 --- ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java index df483a3..0f78928 100644 --- a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java +++ b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java @@ -2,9 +2,11 @@ import io.undertow.server.DefaultByteBufferPool; import io.undertow.websockets.jsr.WebSocketDeploymentInfo; +import org.dromara.common.core.utils.SpringUtils; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; +import org.springframework.core.task.VirtualThreadTaskExecutor; /** * Undertow 鑷畾涔夐厤缃� @@ -24,12 +26,12 @@ WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo(); webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 512)); deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo); - // 浣跨敤铏氭嫙绾跨▼ 瑙i櫎涓嬫柟娉ㄩ噴 浠呴檺jdk21 -// if (SpringUtils.isVirtual()) { -// VirtualThreadTaskExecutor executor = new VirtualThreadTaskExecutor("undertow-"); -// deploymentInfo.setExecutor(executor); -// deploymentInfo.setAsyncExecutor(executor); -// } + // 浣跨敤铏氭嫙绾跨▼ + if (SpringUtils.isVirtual()) { + VirtualThreadTaskExecutor executor = new VirtualThreadTaskExecutor("undertow-"); + deploymentInfo.setExecutor(executor); + deploymentInfo.setAsyncExecutor(executor); + } }); } -- Gitblit v1.9.3