From e67870fff62635cd14beb0d5988f08aeef4b22fa Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期一, 07 四月 2025 21:27:06 +0800
Subject: [PATCH] 添加远程关阀式终止灌溉计划,未测试

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/config/WebSocketConfig.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/config/WebSocketConfig.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/config/WebSocketConfig.java
new file mode 100644
index 0000000..9b3272e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/config/WebSocketConfig.java
@@ -0,0 +1,26 @@
+package com.dy.pipIrrRemote.config;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/2/10 15:42
+ * @Description
+ */
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.socket.server.standard.ServerEndpointExporter;
+
+//寮�鍚疻ebSocket鐨勬敮鎸侊紝骞舵妸璇ョ被娉ㄥ叆鍒皊pring瀹瑰櫒涓�
+@Configuration
+public class WebSocketConfig {
+    /**
+     * ServerEndpointExporter锛氬畠鏄� Spring 鎻愪緵鐨勪竴涓� Bean锛屽叾浣滅敤鏄壂鎻忓甫鏈� @ServerEndpoint 娉ㄨВ鐨勭被锛�
+     * 骞跺皢瀹冧滑娉ㄥ唽涓� WebSocket 绔偣銆備篃灏辨槸璇达紝鍊熷姪 ServerEndpointExporter锛孲pring 鍙互鎶婁娇鐢� Java WebSocket
+     * 瑙勮寖娉ㄨВ锛堝 @ServerEndpoint锛夊畾涔夌殑绔偣闆嗘垚鍒� Spring 搴旂敤涓��
+     * @return
+     */
+    @Bean
+    public ServerEndpointExporter serverEndpointExporter() {
+        return new ServerEndpointExporter();
+    }
+}
+

--
Gitblit v1.8.0