苍穹外卖--WebSocket-服务器与客户端双向通讯

This commit is contained in:
2025-12-01 14:01:16 +08:00
parent 2c2b7b86a5
commit 8e742cd563
5 changed files with 118 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
package com.sky.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
* WebSocket配置类用于注册WebSocket的Bean
*/
@Configuration
public class WebSocketConfiguration {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}