[牛客社区开发(六)]SpringSecurity

[牛客社区开发(六)]SpringSecurity一、基础配置1.导入依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-se


[牛客社区开发(六)]集成Elasticsearch

Elasticsearch一、Elasticsearch入门①配置集群名称(cluster.name)打开config里的elasticsearch.yml,在里面配置cluster.name: nowcoder②配置path.datapath.data: c:\work\data\elastics


[牛客社区开发(六)]集成Kafka消息队列

Kafka1.阻塞队列2.Kafka入门Topic:指存放数据的空间Partition:指存放消息的分区Offset:消息存放的索引Leader Replica:主副本,消费者从主副本获取数据Follower Replica:从主副本备份数据,不负责响应。如果某个时候主副本挂了,就会从从副本中选择一


牛客社区开发(五)

1.私信功能①数据库字段②编写实体类和Mapper@Data@ToStringpublic class Message { private int id; private int fromId; private int toId; private String convers


牛客社区开发(四)

牛客社区(四)一、拦截器拦截器有三个方法 preHandle、postHandle、afterHandle。preHandle:在Controller之前执行postHandle:在Controller之后执行afterHandle:在TemplateEngine之后执行①编写自定义注解@Targe


牛客社区开发(三)

一、会话管理①Cookiecookie是服务器发送到浏览器,并保存在浏览器端的一小块数据。浏览器下次访问该服务器时,会自动携带该数据,将其发送给服务器。 //cookie示例 @RequestMapping(path = "/cookie/set",method =


牛客社区开发(二)

牛客社区开发(二)一、邮件功能①导入坐标<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-mail</artifactId


牛客社区开发(一)

一、首页分页功能①导入静态资源②编写index.html页面导入thymeleaf.org模板,修改静态资源引入方式编写分页功能<!-- 分页 --><nav class="mt-5" th:if="${page.rows>0}">