Ver Fonte

添加测试配置

wuhongshuang há 3 anos atrás
pai
commit
47c8079aa8

+ 7 - 4
src/main/resources/bootstrap.properties

@@ -1,15 +1,18 @@
 server.port=49003
+
 spring.application.name=config-server
+
 # eureka
 eureka.instance.hostname=config-server
 eureka.instance.prefer-ip-address=true
-eureka.client.service-url.defaultZone=http://112.74.63.148:49001/eureka/
+eureka.client.service-url.defaultZone=http://120.25.151.99:49001/eureka/
+#eureka.client.service-url.defaultZone=@eureka-url@
 #eureka.instance.instance-id=${eureka.instance.hostname}:${server.port}
-eureka.instance.ip-address=112.74.63.148
+eureka.instance.ip-address=120.25.151.99
 # config
 spring.profiles.active=jdbc
-spring.cloud.config.server.jdbc.sql=SELECT config_key as KEY, config_value as VALUE from sys_properties where (APPLICATION=? or application='application-default') and PROFILE='default' and LABEL=? and status='1'
-spring.datasource.url=jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl
+spring.cloud.config.server.jdbc.sql=SELECT config_key as `KEY`, config_value as `VALUE` from sys_properties where (APPLICATION=? or application='application-default') and (PROFILE=? or PROFILE='default') and LABEL=? and status='1'
+spring.datasource.url=jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl-test
 spring.datasource.username=root
 spring.datasource.password=sunzee@020
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver

+ 2 - 2
src/main/resources/bootstrap.properties.prod

@@ -5,10 +5,10 @@ eureka.instance.hostname=config-server
 eureka.instance.prefer-ip-address=true
 eureka.client.service-url.defaultZone=http://112.74.63.148:49001/eureka/
 #eureka.instance.instance-id=${eureka.instance.hostname}:${server.port}
-eureka.instance.ip-address=112.74.63.148
+#eureka.instance.ip-address=112.74.63.148
 # config
 spring.profiles.active=jdbc
-spring.cloud.config.server.jdbc.sql=SELECT config_key as KEY, config_value as VALUE from sys_properties where (APPLICATION=? or application='application-default') and PROFILE='default' and LABEL=? and status='1'
+spring.cloud.config.server.jdbc.sql=SELECT config_key as `KEY`, config_value as `VALUE` from sys_properties where (APPLICATION=? or application='application-default') and (PROFILE=? or PROFILE='default') and LABEL=? and status='1'
 spring.datasource.url=jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl
 spring.datasource.username=root
 spring.datasource.password=sunzee@020

+ 4 - 1
src/main/resources/bootstrap.properties.sit

@@ -1,14 +1,17 @@
 server.port=49003
+
 spring.application.name=config-server
+
 # eureka
 eureka.instance.hostname=config-server
 eureka.instance.prefer-ip-address=true
 eureka.client.service-url.defaultZone=http://120.25.151.99:49001/eureka/
+#eureka.client.service-url.defaultZone=@eureka-url@
 #eureka.instance.instance-id=${eureka.instance.hostname}:${server.port}
 eureka.instance.ip-address=120.25.151.99
 # config
 spring.profiles.active=jdbc
-spring.cloud.config.server.jdbc.sql=SELECT config_key as KEY, config_value as VALUE from sys_properties where (APPLICATION=? or application='application-default') and PROFILE='default' and LABEL=? and status='1'
+spring.cloud.config.server.jdbc.sql=SELECT config_key as `KEY`, config_value as `VALUE` from sys_properties where (APPLICATION=? or application='application-default') and (PROFILE=? or PROFILE='default') and LABEL=? and status='1'
 spring.datasource.url=jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl-test
 spring.datasource.username=root
 spring.datasource.password=sunzee@020