- 新增 DeleteNoteReqVO 请求参数类,用于接收笔记删除请求 - 在 NoteController 中添加 /delete 接口,实现笔记删除功能 - 在 NoteService 和 NoteServiceImpl 中实现 deleteNote 方法 - 删除笔记时进行权限校验,仅允许笔记创建者删除 - 删除操作为逻辑删除,更新笔记状态为已删除 - 删除笔记后清除 Redis 缓存,并通过 MQ 广播通知各实例清除本地缓存 -优化更新和可见性接口的权限校验逻辑,避免重复代码 - 添加 MQ 测试类 MQTests,用于批量发送关注/取关消息 - 引入 Guava 的 RateLimiter 实现 MQ 消费端限流- 配置 Nacos 配置中心依赖及动态刷新配置 - 更新 .gitignore 文件,忽略日志文件目录 - 在 application.yml 中添加 MQ 消费者限流配置项 - 在 bootstrap.yml 中完善 Nacos 配置中心相关配置 - 为 FollowUnfollowConsumer 添加限流逻辑,防止消费端压力过大
121 lines
3.8 KiB
XML
121 lines
3.8 KiB
XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<!-- 指定父项目 -->
|
|
<parent>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>han-note-user-relation</artifactId>
|
|
<version>${revision}</version>
|
|
</parent>
|
|
|
|
<!-- 打包方式 -->
|
|
<packaging>jar</packaging>
|
|
|
|
<artifactId>han-note-user-relation-biz</artifactId>
|
|
<name>${project.artifactId}</name>
|
|
<description>用户关系服务业务模块</description>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>hanserwei-common</artifactId>
|
|
</dependency>
|
|
|
|
<!-- 业务接口日志组件 -->
|
|
<dependency>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>hanserwei-spring-boot-starter-biz-operationlog</artifactId>
|
|
</dependency>
|
|
|
|
<!-- 上下文组件 -->
|
|
<dependency>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>hanserwei-spring-boot-starter-biz-context</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Jackson 组件 -->
|
|
<dependency>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>hanserwei-spring-boot-starter-jackson</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
|
</dependency>
|
|
|
|
<!-- 服务发现 -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Mybatis -->
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
|
</dependency>
|
|
|
|
<!-- MySQL 驱动 -->
|
|
<dependency>
|
|
<groupId>com.mysql</groupId>
|
|
<artifactId>mysql-connector-j</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Druid 数据库连接池 -->
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
|
</dependency>
|
|
|
|
<!-- 提供 Redis 连接池 -->
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-pool2</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Redis -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>han-note-user-api</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Rocket MQ -->
|
|
<dependency>
|
|
<groupId>org.apache.rocketmq</groupId>
|
|
<artifactId>rocketmq-spring-boot-starter</artifactId>
|
|
</dependency>
|
|
|
|
<!-- NaCos 配置中心 -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|