文章分类 - SpringBoot2
摘要:在WebSocket广播式的基础上修改即可 第一步:我们在pom.xml配置文件中增加Spring Security <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-se
阅读全文
摘要:第一步:创建SpringBoot项目:我们要勾选web、Thymeleaf、websocket三个 第二步:配置WebSocket:广播式即服务端有消息时,会将消息发送给所有连接了 当前endpoint(端点)的浏览器 import org.springframework.context.annot
阅读全文
摘要:第一步:创建Spring Boot项目,勾选Thymeleaf 第二步:创建JavaBean,包含带参数和不带参数的构造方法 public class Person { private String name; private Integer age; public Person() { super
阅读全文