zx 3 lat temu
rodzic
commit
ca14fc0582
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/main/resources/bootstrap.yml

+ 3 - 0
src/main/resources/bootstrap.yml

@@ -18,7 +18,10 @@ spring:
 eureka:
   client:
     service-url:
+
       defaultZone: http://root:root@${EUREKA_HOST:172.16.33.166}:${EUREKA_PORT:8081}/eureka/
+    register-with-eureka: false #表示向EurekaServer注册自己 默认为true
+    fetch-registry: false #是否从EurekaServer抓取已有的注册信息,默认为true,单节点无所谓,集群必须设置为true才能配合ribbon使用负载均衡
   instance:
     prefer-ip-address: false
     status-page-url: http://${spring.cloud.client.ip-address}:${server.port}/swagger-ui.html#/