![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring Boot
qq_37279648
这个作者很懒,什么都没留下…
展开
-
Spring Boot + WebSocket + Spring Security(定向发送消息)
定向发送消息涉及到用户,需要引入Spring Security相关内容。1.添加Spring Security,websocket和thymeleaf等依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency><dependency>原创 2020-10-08 22:48:24 · 2334 阅读 · 1 评论 -
Spring Boot + WebSocket(广播的方式发送消息)
使用广播的方式,该方式将消息发送给所有连接了当前endpoint的浏览器1.添加websocket依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId></dependency>2.配置WebSocket,需要在配置类上使用@EnableWe原创 2020-10-07 21:13:36 · 946 阅读 · 1 评论