refactor(config): 将配置文件迁移至 Nacos 并优化通知事件

- 移除 application-dev.yaml 和 application-local.yaml 配置文件
- 将 Nacos 配置外置到根 pom 的 nacos.* 属性中
- 添加配置中心文件加载配置(rdms-common.yaml、rdms-common-secret.yaml)
- 网关服务仅用 Nacos 做服务发现,不加载配置中心文件
- 为系统服务添加独有敏感配置(rdms-system-server-secret.yaml)
- 为 mapper 添加 SQL 日志打印配置
- 为 NotifySendEvent 添加操作人用户编号字段用于排除通知
- 修改 NotifySendEvent 构造函数支持操作人排除参数
- 在通知监听器中实现操作人排除逻辑
- 添加操作人排除功能的单元测试
This commit is contained in:
2026-06-17 21:01:11 +08:00
parent a244ae4ad3
commit 117dd91afd
44 changed files with 998 additions and 528 deletions

View File

@@ -2,9 +2,6 @@ spring:
application:
name: gateway-server
profiles:
active: local
http:
codecs:
max-in-memory-size: 10MB # 调整缓冲区大小https://gitee.com/zhijiantianya/rdms-cloud/pulls/176
@@ -20,12 +17,15 @@ spring:
main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
config:
import:
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
cloud:
# 注册中心连接(值由根 pom 的 nacos.* 属性在打包时注入)。网关仅用 Nacos 做服务发现,不加载配置中心文件。
nacos:
server-addr: @nacos.server-addr@
username: @nacos.username@
password: @nacos.password@
discovery:
namespace: @nacos.namespace@
group: @nacos.group@
# Spring Cloud Gateway 配置项,对应 GatewayProperties 类
gateway:
server:
@@ -89,6 +89,16 @@ server:
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
level:
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录
exposure:
include: '*' # 开放所有端点
knife4j:
# 聚合 Swagger 文档,参考 https://doc.xiaominfo.com/docs/action/springcloud-gateway 文档