Files
rui-docs/backend/config-templates/application-template.yml
T
vifo 01f36acdd7 feat(config): 添加 rui-service-starter Nacos 配置模板和 modules 配置示例
- 新增 rui-service-starter.yaml Nacos 配置模板(含 modules 配置)
- 更新 application-template.yml 添加 modules 配置说明和示例

对应工单 #1
2026-06-05 08:23:23 +08:00

83 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================================
# 睿核科技 — 通用平台框架 通用 application.yml 模板
# ============================================================================
# 使用方法:
# 复制到新模块的 src/main/resources/application.yml
# 修改 server.port 为模块对应端口
# 本地开发配置见项目根目录 config/application-dev.yml(不提交 git
# ============================================================================
server:
port: XXXX # 模块端口(按规划分配)
shutdown: graceful # 优雅关闭
spring:
application:
name: @artifactId@ # Maven 过滤,自动替换为模块名
profiles:
active: @profiles.active@ # Maven 过滤,默认 dev
lifecycle:
timeout-per-shutdown-phase: 30s # 优雅关闭等待时间
autoconfigure:
exclude:
servlet:
multipart:
max-file-size: 5MB
max-request-size: 10MB
encoding:
charset: UTF-8
enabled: true
force: true
cloud:
openfeign:
circuitbreaker:
enabled: true
nacos:
discovery: # 服务发现(独立环境变量,不依赖 config)
server-addr: ${NACOS_SERVER_ADDR:nacos:8848}
namespace: ${NACOS_NAMESPACE:}
group: ${NACOS_GROUP:DEFAULT_GROUP}
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:nacos}
config: # 配置中心
server-addr: ${NACOS_SERVER_ADDR:nacos:8848}
namespace: ${NACOS_NAMESPACE:}
group: ${NACOS_GROUP:DEFAULT_GROUP}
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:nacos}
file-extension: yaml
import-check:
enabled: true
config:
import:
- optional:nacos:${spring.application.name}.${spring.cloud.nacos.config.file-extension:yaml}
- optional:nacos:rui-common.${spring.cloud.nacos.config.file-extension:yaml}
# 无 MyBatis 的模块(gateway)请删除下面这行
- optional:nacos:rui-data.${spring.cloud.nacos.config.file-extension:yaml}
# ============================================================================
# 模块管理配置(可选,仅在需要管理租户模块时配置)
# 配置位置:Nacos rui-service-starter.yaml 或本模块的 Nacos 配置
# ============================================================================
# rui:
# modules:
# # 全局可用模块列表(供租户管理的模块配置弹窗使用)
# available:
# - code: system
# name: 系统管理
# icon: tabler:settings
# - code: user
# name: 用户管理
# icon: tabler:users
# # 默认启用模块(新租户默认开启,逗号分隔)
# default-enabled: system,user
management:
endpoints:
web:
exposure:
include: health
discovery:
enabled: false