Bladeren bron

Merge branch 'master' of https://git.steerinfo.com/XTEMS/xt-ems-datasource

QuietShadow 3 jaren geleden
bovenliggende
commit
0a56f487bf

+ 2 - 1
src/main/java/com/steerinfo/DataSouceApplication.java

@@ -7,6 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.netflix.hystrix.EnableHystrix;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 
@@ -16,7 +17,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCaching
 @EnableFeignClients
-@EnableDiscoveryClient
+@EnableEurekaClient
 public class DataSouceApplication {
     public static void main(String[] args) {
         SpringApplication.run(DataSouceApplication.class, args);

+ 4 - 1
src/main/resources/application.properties

@@ -14,4 +14,7 @@ eureka.client.serviceUrl.defaultZone= http://root:root@${EUREKA_HOST:172.16.90.2
 #¿ªÆô¸ºÔؾù
 ribbon.eureka.enabled=true
 eureka.client.metadata-map.cluster=ribbon
-management.endpoints.web.exposure.include=*
+eureka.instance.hostname=xt-ems-datasource
+eureka.instance.prefer-ip-address=true
+eureka.instance.instance-id=${spring.cloud.client.ip-address}:${server.port}
+management.endpoints.web.exposure.include= '*'