diff --git a/src/main/resources/application-gxtyzx-test.yml b/src/main/resources/application-gxtyzx-test.yml index e1ce706..afa6577 100644 --- a/src/main/resources/application-gxtyzx-test.yml +++ b/src/main/resources/application-gxtyzx-test.yml @@ -1,9 +1,9 @@ # 测试环境配置(8.134.55.105:13306 / 本地 Redis database 5) # -# 启动方式: -# ./mvnw spring-boot:run -Dspring-boot.run.profiles=gxtyzx-test +# application.yml 已默认激活 gxtyzx-test,直接启动即可: +# ./mvnw spring-boot:run # 或: -# java -jar target/com-gxwebsoft-server-1.5.2.jar --spring.profiles.active=gxtyzx-test +# java -jar target/com-gxwebsoft-server-1.5.2.jar spring: datasource: diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2aca9fe..585021b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,8 +7,10 @@ socketio: # 多环境配置 spring: profiles: + # 开发环境固定使用测试库(8.134.55.105 / Redis db5);生产/其他环境通过 SPRING_PROFILES_ACTIVE 覆盖 + active: ${SPRING_PROFILES_ACTIVE:gxtyzx-test} # active: dev - active: dev-local +# active: dev-local # active: prod application: