refactor(system): 重构system配置管理

This commit is contained in:
黄斌峰
2026-08-10 07:35:19 +08:00
parent 0aae137e7b
commit 570aa77f4e
5 changed files with 27 additions and 30 deletions
@@ -0,0 +1,26 @@
server:
port: 8106
spring:
application:
name: blade-system
config:
import:
- nacos:blade.yaml?group=DEFAULT_GROUP&refreshEnabled=true
- nacos:blade-${spring.profiles.active}.yaml?group=DEFAULT_GROUP&refreshEnabled=true
- nacos:third-party-api.yaml?group=DEFAULT_GROUP&refreshEnabled=true
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml?group=DEFAULT_GROUP&refreshEnabled=true
cloud:
nacos:
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:nacos}
server-addr: ${NACOS_HOST:127.0.0.1:8848}
discovery:
namespace: ${NACOS_NAMESPACE:${spring.profiles.active}}
config:
file-extension: yaml
namespace: ${NACOS_NAMESPACE:${spring.profiles.active}}
datasource:
url: ${blade.datasource.${spring.profiles.active}.url}
username: ${blade.datasource.${spring.profiles.active}.username}
password: ${blade.datasource.${spring.profiles.active}.password}