feat(other): 产品基础功能提交
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
spring:
|
||||
application:
|
||||
name: rdms-project-server
|
||||
profiles:
|
||||
active: local
|
||||
main:
|
||||
allow-circular-references: true # 允许循环依赖,因为项目当前沿用三层架构组织方式。
|
||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如 Feign 等会存在重复定义的服务
|
||||
config:
|
||||
import:
|
||||
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
|
||||
# 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
|
||||
|
||||
logging:
|
||||
file:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
|
||||
--- #################### 接口文档配置 ####################
|
||||
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
|
||||
encryptor:
|
||||
password: cDHvwsYb9eyLNBHp # 加解密秘钥,生产环境务必通过 Nacos 注入,切勿硬编码
|
||||
|
||||
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
|
||||
|
||||
debug: false
|
||||
Reference in New Issue
Block a user