疯狂的狮子Li
2024-01-18 5e5fe434e2e83f234567153c9f6a4c3b39a02e17
ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java
@@ -25,8 +25,10 @@
            webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 512));
            deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
            // 使用虚拟线程 解除下方注释 仅限jdk21
//            if (SpringUtils.getProperty("spring.threads.virtual.enabled", Boolean.class, false)) {
//                deploymentInfo.setExecutor(Executors.newVirtualThreadPerTaskExecutor());
//            if (SpringUtils.isVirtual()) {
//                ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();
//                deploymentInfo.setExecutor(executor);
//                deploymentInfo.setAsyncExecutor(executor);
//            }
        });
    }