
Springboot项目中如何使用WebSocket实现消息推送
1.首先我们需要在pom.xml中添加websocket依赖:
2、新建WebSocket配置类
3. 新建WebSocket服务端
4. 启动后,客户端连接websocket

1.首先我们需要在pom.xml中添加websocket依赖: