From e1507f52e66bbf1c5e16e2a743cdab3f73c7ef9f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 18 二月 2025 12:05:14 +0800
Subject: [PATCH] 去掉某个依赖

---
 ruoyi-common/ruoyi-common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports |    2 
 ruoyi-common/ruoyi-common-web/pom.xml                                                                                             |   10 ++--
 ruoyi-admin/src/main/resources/application.yml                                                                                    |   26 ++++++------
 ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java                                     |   60 +++++++++++++++---------------
 4 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 09ea022..9fdb460 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -27,19 +27,19 @@
     # 搴旂敤鐨勮闂矾寰�
     context-path: /
   # undertow 閰嶇疆
-  undertow:
-    # HTTP post鍐呭鐨勬渶澶уぇ灏忋�傚綋鍊间负-1鏃讹紝榛樿鍊间负澶у皬鏄棤闄愮殑
-    max-http-post-size: -1
-    # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞�
-    # 姣忓潡buffer鐨勭┖闂村ぇ灏�,瓒婂皬鐨勭┖闂磋鍒╃敤瓒婂厖鍒�
-    buffer-size: 512
-    # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛�
-    direct-buffers: true
-    threads:
-      # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋�
-      io: 8
-      # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞�
-      worker: 256
+#  undertow:
+#    # HTTP post鍐呭鐨勬渶澶уぇ灏忋�傚綋鍊间负-1鏃讹紝榛樿鍊间负澶у皬鏄棤闄愮殑
+#    max-http-post-size: -1
+#    # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞�
+#    # 姣忓潡buffer鐨勭┖闂村ぇ灏�,瓒婂皬鐨勭┖闂磋鍒╃敤瓒婂厖鍒�
+#    buffer-size: 512
+#    # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛�
+#    direct-buffers: true
+#    threads:
+#      # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋�
+#      io: 8
+#      # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞�
+#      worker: 256
 
 # 鏃ュ織閰嶇疆
 logging:
diff --git a/ruoyi-common/ruoyi-common-web/pom.xml b/ruoyi-common/ruoyi-common-web/pom.xml
index 293c522..0f32dd7 100644
--- a/ruoyi-common/ruoyi-common-web/pom.xml
+++ b/ruoyi-common/ruoyi-common-web/pom.xml
@@ -37,11 +37,11 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <!-- web 瀹瑰櫒浣跨敤 undertow 鎬ц兘鏇村己 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-undertow</artifactId>
-        </dependency>
+<!--        &lt;!&ndash; web 瀹瑰櫒浣跨敤 undertow 鎬ц兘鏇村己 &ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-undertow</artifactId>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>org.springframework.boot</groupId>
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 421ce6d..acfeee5 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
@@ -1,30 +1,30 @@
-package org.dromara.common.web.config;
-
-import io.undertow.server.DefaultByteBufferPool;
-import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
-import org.springframework.boot.web.server.WebServerFactoryCustomizer;
-
-/**
- * Undertow 鑷畾涔夐厤缃�
- *
- * @author Lion Li
- */
-@AutoConfiguration
-public class UndertowConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
-
-    /**
-     * 璁剧疆 Undertow 鐨� websocket 缂撳啿姹�
-     */
-    @Override
-    public void customize(UndertowServletWebServerFactory factory) {
-        // 榛樿涓嶇洿鎺ュ垎閰嶅唴瀛� 濡傛灉椤圭洰涓娇鐢ㄤ簡 websocket 寤鸿鐩存帴鍒嗛厤
-        factory.addDeploymentInfoCustomizers(deploymentInfo -> {
-            WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
-            webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 512));
-            deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
-        });
-    }
-
-}
+//package org.dromara.common.web.config;
+//
+//import io.undertow.server.DefaultByteBufferPool;
+//import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
+//import org.springframework.boot.autoconfigure.AutoConfiguration;
+//import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
+//import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+//
+///**
+// * Undertow 鑷畾涔夐厤缃�
+// *
+// * @author Lion Li
+// */
+//@AutoConfiguration
+//public class UndertowConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
+//
+//    /**
+//     * 璁剧疆 Undertow 鐨� websocket 缂撳啿姹�
+//     */
+//    @Override
+//    public void customize(UndertowServletWebServerFactory factory) {
+//        // 榛樿涓嶇洿鎺ュ垎閰嶅唴瀛� 濡傛灉椤圭洰涓娇鐢ㄤ簡 websocket 寤鸿鐩存帴鍒嗛厤
+//        factory.addDeploymentInfoCustomizers(deploymentInfo -> {
+//            WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
+//            webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 512));
+//            deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
+//        });
+//    }
+//
+//}
diff --git a/ruoyi-common/ruoyi-common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-common/ruoyi-common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index fc10a36..0669bd4 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/ruoyi-common/ruoyi-common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -2,4 +2,4 @@
 org.dromara.common.web.config.FilterConfig
 org.dromara.common.web.config.I18nConfig
 org.dromara.common.web.config.ResourcesConfig
-org.dromara.common.web.config.UndertowConfig
+

--
Gitblit v1.8.0