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 288740f4df2fefdcace138d304c53a1dc8dbc503..37ebe10920b02a9cab64ad3edf4ccd1bf120c830 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() {