1. 修改actived可以通过指定profile动态切换

This commit is contained in:
Hccake committed 2019-08-15 10:42:11 +08:00
1 parent 4ee400466c
commit 0a1ce03a51
12 files changed
+39 -11

No files matched your search

+1 -1
View File
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -15,4 +15,4 @@ spring:
autoconfigure:
exclude: org.springframework.cloud.gateway.config.GatewayAutoConfiguration,org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration
profiles:
active: dev
active: @profiles.active@
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -16,4 +16,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -13,7 +13,7 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
turbine:
app-config: pigx-upms-biz,pigx-auth
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
@@ -13,4 +13,4 @@ spring:
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
active: dev
active: @profiles.active@
+28
View File
@@ -266,4 +266,32 @@
<url>http://nexus.gitee.wang/repository/maven-releases/</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>dev</id>
<properties>
<!-- 环境标识,需要与配置文件的名称相对应 -->
<profiles.active>dev</profiles.active>
</properties>
<activation>
<!-- 默认环境 -->
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>test</id>
<properties>
<profiles.active>test</profiles.active>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<profiles.active>prod</profiles.active>
</properties>
</profile>
</profiles>
</project>