refactor(auth): 重构认证服务配置管理

This commit is contained in:
黄斌峰
2026-08-07 19:05:15 +08:00
parent 1e1a817081
commit f692d8e275
5 changed files with 29 additions and 46 deletions
+27 -1
View File
@@ -1,6 +1,30 @@
# 在使用Spring默认数据源Hikari的情况下配置以下配置项
#服务器端口
server:
port: 8100
spring:
application:
name: blade-auth
config:
import:
- nacos:blade.yaml?group=DEFAULT_GROUP&refreshEnabled=true
- nacos:blade-${spring.profiles.active}.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}
# 在使用Spring默认数据源Hikari的情况下配置以下配置项
hikari:
# 自动提交从池中返回的连接
auto-commit: true
@@ -42,6 +66,8 @@ swagger:
#第三方登陆
social:
enabled: true
domain: http://127.0.0.1:2888
oauth:
GITHUB:
client-id: 233************