多环境配置

This commit is contained in:
hetianchen
2020-12-16 22:25:41 +08:00
parent 1c023fbe7c
commit 9cda9301d5
8 changed files with 369 additions and 260 deletions

View File

@@ -9,17 +9,27 @@ spring:
name: ruoyi-gateway
profiles:
# 环境配置
active: dev
active: @profile.active@
main:
allow-bean-definition-overriding: true
cloud:
nacos:
# 注册中心
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: @discovery.server-addr@
# 配置命名空间
namespace: @config.namespaceId@
# 配置groupID
group: ${spring.profiles.active}
# 配置中心
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: @config.server-addr@
# 配置命名空间
namespace: @config.namespaceId@
# 配置groupID
group: ${spring.profiles.active}
# 配置文件格式
file-extension: yml
# 共享配置
@@ -34,8 +44,8 @@ spring:
datasource:
ds1:
nacos:
server-addr: 127.0.0.1:8848
server-addr: @config.server-addr@
dataId: sentinel-ruoyi-gateway
groupId: DEFAULT_GROUP
groupId: ${spring.profiles.active}
data-type: json
rule-type: flow