From 2ebacefb5085c0892fab6e181cd2c6b38e2bec82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 22 Jan 2024 13:03:21 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E8=A7=A3?= =?UTF-8?q?=E9=99=A4=E6=B3=A8=E9=87=8A=20=E4=BD=BF=E7=94=A8spring=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E8=99=9A=E6=8B=9F=E7=BA=BF=E7=A8=8B=E6=B1=A0=E6=97=A0?= =?UTF-8?q?=E9=A1=BB=E6=8B=85=E5=BF=83idea=E8=AD=A6=E5=91=8A=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/nacos/application-common.yml | 1 - .../dromara/common/web/config/UndertowConfig.java | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/nacos/application-common.yml b/config/nacos/application-common.yml index 2fd52cd9..79e26adc 100644 --- a/config/nacos/application-common.yml +++ b/config/nacos/application-common.yml @@ -40,7 +40,6 @@ dubbo: spring: threads: # 开启虚拟线程 仅jdk21可用 - # 开启后还需更改 UndertowConfig 虚拟线程配置 virtual: enabled: false # 资源信息 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 df483a39..0f789286 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 @@ package org.dromara.common.web.config; 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 @@ public class UndertowConfig implements WebServerFactoryCustomizer