docs(nacos): rui-service-storage 业务配置模板
- 包含 rui.file.* 全部业务配置 active / default-max-size / biz-types (4个) / aliyun / tencent / local - 服务端口 9400 - 严格遵循 docs/ai-skills/nacos-config-rules.md Rule 2 仅放本服务特有业务配置,不含 Nacos 连接/编码/feign 等通用项 关联 Gitea #4 / 设计文档 §9.3
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# rui-service-storage.yaml — 统一文件存储服务配置
|
||||
# Data ID: rui-service-storage.yaml
|
||||
# Group: DEFAULT_GROUP
|
||||
# 推送到 Nacos 后必须按 docs/ai-skills/nacos-config-rules.md 验证
|
||||
|
||||
# 服务端口:9400(独立部署)/ 9399(被 rui-service-starter 聚合时使用 starter 端口)
|
||||
server:
|
||||
port: 9400
|
||||
|
||||
# ============================================================================
|
||||
# 统一文件存储配置(rui.file.*)
|
||||
# 业务配置仅放本服务,公共/框架配置已由 application-template.yml 覆盖
|
||||
# ============================================================================
|
||||
rui:
|
||||
file:
|
||||
# 当前激活的存储后端:aliyun / tencent / local
|
||||
active: local
|
||||
|
||||
# 默认文件大小上限(按 bizType 未配置时使用)
|
||||
default-max-size: 10MB
|
||||
|
||||
# 各业务类型的白名单与大小限制,key = FileBizType 枚举值
|
||||
biz-types:
|
||||
# 通用文件(无业务白名单限制)
|
||||
COMMON:
|
||||
max-size: 10MB
|
||||
allowed-extensions: [] # 空 = 不限
|
||||
|
||||
# 第三方应用证书(pem/crt/key/p12)
|
||||
SYS_APP_CERT:
|
||||
max-size: 5MB
|
||||
allowed-extensions: [pem, crt, key, p12]
|
||||
|
||||
# 用户头像
|
||||
USER_AVATAR:
|
||||
max-size: 2MB
|
||||
allowed-extensions: [jpg, jpeg, png, webp]
|
||||
|
||||
# CMS 轮播图
|
||||
CMS_BANNER:
|
||||
max-size: 5MB
|
||||
allowed-extensions: [jpg, jpeg, png, webp, gif]
|
||||
|
||||
# 阿里云 OSS 后端
|
||||
aliyun:
|
||||
enabled: false
|
||||
endpoint: oss-cn-shanghai.aliyuncs.com
|
||||
access-key: ${ALIYUN_AK:}
|
||||
secret-key: ${ALIYUN_SK:}
|
||||
bucket: rui-storage
|
||||
url-prefix: https://rui-storage.oss-cn-shanghai.aliyuncs.com
|
||||
base-path: cert/
|
||||
|
||||
# 腾讯云 COS 后端
|
||||
tencent:
|
||||
enabled: false
|
||||
secret-id: ${TENCENT_SID:}
|
||||
secret-key: ${TENCENT_SKEY:}
|
||||
region: ap-shanghai
|
||||
bucket: rui-storage-1300000000
|
||||
url-prefix: https://rui-storage-1300000000.cos.ap-shanghai.myqcloud.com
|
||||
base-path: cert/
|
||||
|
||||
# 本地存储后端(默认/兜底)
|
||||
local:
|
||||
base-path: ${user.home}/.rui/upload/
|
||||
url-prefix: /api/storage/local/
|
||||
Reference in New Issue
Block a user