Files
rui-docs/backend/config-templates/application-template.yml
T
vifo 57cc87a145 docs(template): 在 application-template.yml 中标注允许修改位置
- server.port 处增加【允许修改】注释
- rui-data import 处增加【允许修改】注释
2026-06-05 10:24:44 +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