From 2a54d7dfc3a3cfee303329e318b2cfefd8d0c94c Mon Sep 17 00:00:00 2001 From: Denivko Date: Tue, 24 Jun 2025 05:42:58 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8MEMORY=E4=B8=BAwebsocket?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95=E8=BF=9E=E6=8E=A5=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Denivko --- .../websocket/memory/MemoryWebSocketConfiguration.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wemirr-platform-framework/websocket-spring-boot-starter/src/main/java/com/wemirr/framework/websocket/memory/MemoryWebSocketConfiguration.java b/wemirr-platform-framework/websocket-spring-boot-starter/src/main/java/com/wemirr/framework/websocket/memory/MemoryWebSocketConfiguration.java index 288740f4..37ebe109 100644 --- a/wemirr-platform-framework/websocket-spring-boot-starter/src/main/java/com/wemirr/framework/websocket/memory/MemoryWebSocketConfiguration.java +++ b/wemirr-platform-framework/websocket-spring-boot-starter/src/main/java/com/wemirr/framework/websocket/memory/MemoryWebSocketConfiguration.java @@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.web.socket.server.standard.ServerEndpointExporter; /** * 内存管理websocket配置 @@ -34,8 +35,14 @@ import org.springframework.context.annotation.Configuration; */ @Configuration @EnableConfigurationProperties(WebSocketProperties.class) +@ConditionalOnProperty(name = "spring.websocket.manager.type", havingValue = "MEMORY", matchIfMissing = true) public class MemoryWebSocketConfiguration { + @Bean + public ServerEndpointExporter serverEndpointExporter() { + return new ServerEndpointExporter(); + } + @Bean(WebSocketManager.WEBSOCKET_MANAGER_NAME) @ConditionalOnMissingBean(name = WebSocketManager.WEBSOCKET_MANAGER_NAME) public WebSocketManager webSocketManager() { -- Gitee