2026-04-18 14:19:45 +08:00
|
|
|
|
spring:
|
|
|
|
|
|
application:
|
|
|
|
|
|
name: rdms-project-server
|
|
|
|
|
|
main:
|
|
|
|
|
|
allow-circular-references: true # 允许循环依赖,因为项目当前沿用三层架构组织方式。
|
|
|
|
|
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如 Feign 等会存在重复定义的服务
|
2026-06-17 21:01:11 +08:00
|
|
|
|
cloud:
|
|
|
|
|
|
# 注册中心 + 配置中心连接(值由根 pom 的 nacos.* 属性在打包时注入)
|
|
|
|
|
|
nacos:
|
|
|
|
|
|
server-addr: @nacos.server-addr@
|
|
|
|
|
|
username: @nacos.username@
|
|
|
|
|
|
password: @nacos.password@
|
|
|
|
|
|
discovery:
|
|
|
|
|
|
namespace: @nacos.namespace@
|
|
|
|
|
|
group: @nacos.group@
|
|
|
|
|
|
metadata:
|
|
|
|
|
|
version: ${rdms.info.version} # 灰度发布用的实例版本号
|
|
|
|
|
|
config:
|
|
|
|
|
|
namespace: @nacos.namespace@
|
|
|
|
|
|
group: @nacos.group@
|
2026-04-18 14:19:45 +08:00
|
|
|
|
config:
|
|
|
|
|
|
import:
|
2026-06-17 21:01:11 +08:00
|
|
|
|
- nacos:rdms-common.yaml # 公共非敏感配置(数据库地址/Redis/开关等)
|
|
|
|
|
|
- nacos:rdms-common-secret.yaml # 公共敏感配置(数据库账密/加解密秘钥)
|
2026-04-18 14:19:45 +08:00
|
|
|
|
# Servlet 配置
|
|
|
|
|
|
servlet:
|
|
|
|
|
|
# 文件上传相关配置项
|
|
|
|
|
|
multipart:
|
|
|
|
|
|
max-file-size: 16MB # 单个文件大小
|
|
|
|
|
|
max-request-size: 32MB # 设置总上传的文件大小
|
|
|
|
|
|
# Jackson 配置项
|
|
|
|
|
|
jackson:
|
|
|
|
|
|
serialization:
|
|
|
|
|
|
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
|
|
|
|
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式,例如 1611460870401
|
|
|
|
|
|
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
|
|
|
|
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
|
|
|
|
# Cache 配置项
|
|
|
|
|
|
cache:
|
|
|
|
|
|
type: REDIS
|
|
|
|
|
|
redis:
|
|
|
|
|
|
time-to-live: 1h # 设置过期时间为 1 小时
|
|
|
|
|
|
data:
|
|
|
|
|
|
redis:
|
|
|
|
|
|
repositories:
|
|
|
|
|
|
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
|
|
|
|
|
# 热部署配置
|
|
|
|
|
|
devtools:
|
|
|
|
|
|
restart:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
|
|
|
|
|
|
server:
|
|
|
|
|
|
port: 48082
|
2026-05-18 08:28:33 +08:00
|
|
|
|
tomcat:
|
|
|
|
|
|
# 长连接保活时长:默认沿用 connection-timeout(20s),过短会和网关侧 HttpClient 连接池形成 race,
|
|
|
|
|
|
# 导致网关复用已被服务端关闭的连接抛 PrematureCloseException。
|
|
|
|
|
|
# 必须大于网关 spring.cloud.gateway.server.webflux.httpclient.pool.max-idle-time(30s)。
|
|
|
|
|
|
keep-alive-timeout: 60s
|
2026-04-18 14:19:45 +08:00
|
|
|
|
|
|
|
|
|
|
logging:
|
|
|
|
|
|
file:
|
|
|
|
|
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
2026-06-17 21:01:11 +08:00
|
|
|
|
level:
|
|
|
|
|
|
com.njcn.rdms.module.project.dal.mysql: debug # 打印本模块 Mapper 的 SQL 日志
|
2026-04-18 14:19:45 +08:00
|
|
|
|
|
|
|
|
|
|
--- #################### 接口文档配置 ####################
|
|
|
|
|
|
springdoc:
|
|
|
|
|
|
api-docs:
|
|
|
|
|
|
enabled: true # 1. 是否开启 Swagger 接口文档的元数据
|
|
|
|
|
|
path: /v3/api-docs
|
|
|
|
|
|
swagger-ui:
|
|
|
|
|
|
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
|
|
|
|
|
path: /swagger-ui
|
|
|
|
|
|
default-flat-param-object: true
|
|
|
|
|
|
|
|
|
|
|
|
knife4j:
|
|
|
|
|
|
enable: true
|
|
|
|
|
|
setting:
|
|
|
|
|
|
language: zh_cn
|
|
|
|
|
|
|
|
|
|
|
|
# MyBatis Plus 的配置项
|
|
|
|
|
|
mybatis-plus:
|
|
|
|
|
|
configuration:
|
|
|
|
|
|
map-underscore-to-camel-case: true # 虽然默认为 true,但是还是显示指定下。
|
|
|
|
|
|
global-config:
|
|
|
|
|
|
db-config:
|
|
|
|
|
|
id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法
|
|
|
|
|
|
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
|
|
|
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
|
|
|
|
banner: false # 关闭控制台的 Banner 打印
|
|
|
|
|
|
type-aliases-package: ${rdms.info.base-package}.dal.dataobject
|
2026-06-17 21:01:11 +08:00
|
|
|
|
# encryptor.password(@EncryptField 字段加解密秘钥)已外置到 Nacos rdms-common-secret.yaml,不再硬编码进 git
|
2026-04-18 14:19:45 +08:00
|
|
|
|
|
|
|
|
|
|
mybatis-plus-join:
|
|
|
|
|
|
banner: false # 关闭控制台的 Banner 打印
|
|
|
|
|
|
|
|
|
|
|
|
# VO 转换(数据翻译)相关
|
|
|
|
|
|
easy-trans:
|
|
|
|
|
|
is-enable-global: false # 默认禁用全局翻译,避免额外性能开销
|
|
|
|
|
|
|
|
|
|
|
|
--- #################### RDMS 相关配置 ####################
|
|
|
|
|
|
rdms:
|
|
|
|
|
|
info:
|
|
|
|
|
|
version: 1.0.0
|
|
|
|
|
|
base-package: com.njcn.rdms.module.project
|
|
|
|
|
|
web:
|
|
|
|
|
|
admin-ui:
|
|
|
|
|
|
url: https://www.baidu.com # Admin 管理后台 UI 的占位地址,联调时替换成实际前端入口
|
|
|
|
|
|
xss:
|
|
|
|
|
|
enable: false
|
|
|
|
|
|
exclude-urls:
|
|
|
|
|
|
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
|
|
|
|
|
swagger:
|
|
|
|
|
|
title: 项目交付域管理后台
|
|
|
|
|
|
description: 提供项目集、项目、产品、需求、任务、工单、执行等管理能力
|
|
|
|
|
|
author: RDMS
|
|
|
|
|
|
version: ${rdms.info.version}
|
|
|
|
|
|
url: https://example.com
|
|
|
|
|
|
email: dev@example.com
|
|
|
|
|
|
license: Apache 2.0
|
|
|
|
|
|
license-url: https://www.apache.org/licenses/LICENSE-2.0.html
|
2026-06-13 22:09:49 +08:00
|
|
|
|
work-report:
|
|
|
|
|
|
auto-gen:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
weekly:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
cron: "0 0 12 ? * FRI"
|
|
|
|
|
|
monthly:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
cron: "0 0 12 1-31 * ?"
|
|
|
|
|
|
project:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
cron: "0 0 12 1-31 * ?"
|
|
|
|
|
|
scope:
|
2026-06-14 23:54:16 +08:00
|
|
|
|
dept-ids: [100]
|
2026-04-18 14:19:45 +08:00
|
|
|
|
|
|
|
|
|
|
debug: false
|