Files
rui-docs/backend/config-templates/application-template.yml
T
vifo 8506424c26 feat(config): 添加 rui-service-starter Nacos 配置模板
- 新增 rui-service-starter.yaml Nacos 配置模板
- 添加 modules 可用模块列表配置(供租户管理使用)

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

66 lines
2.3 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}
management:
endpoints:
web:
exposure:
include: health
discovery:
enabled: false