Spring WebSocket入门实例、源码解读、STOMP客户端

1 Spring WebSocket入门实例

在浏览器和服务器之间,使用WebSocket发送和接收消息。具体会使用到WebSocket子协议STOMP。

1.1 创建Spring Boot项目,添加WebSocket依赖

后端Spring Boot的WebSocket依赖,前端使用Thymeleaf,所以需要webjars依赖。

pom.xml如下:

<!-- 后端WebSocket依赖 -->
<dependency>
	<groupId>org.springframework.boot<

猜你喜欢

转载自blog.csdn.net/u012383839/article/details/129717008