forked from kidgrow-microservices-platform

zhaoxiaohao
2020-11-19 6f2393555e3b1c72e766f26e9196e226ffbc24da
kidgrow-springcloud/kidgrow-springcloud-eureka/src/main/resources/application.yml
@@ -14,7 +14,8 @@
eureka:
  instance:
    ###注册中心ip地址
    hostname: 192.168.1.103
#    hostname: 172.17.97.143
    hostname: 127.0.0.1
    lease-renewal-interval-in-seconds: 30
    lease-expiration-duration-in-seconds: 30
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
@@ -24,7 +25,8 @@
      ##注册地址
      #defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@${eureka.instance.hostname}:9002/eureka/,http://${spring.security.user.name}:${spring.security.user.password}@${eureka.instance.hostname}:9003/eureka/
      #defaultZone: http://${eureka.instance.hostname}:9002/eureka/,http://${eureka.instance.hostname}:9003/eureka/
      defaultZone: http://192.168.1.103:9001/eureka/,http://192.168.1.202:9001/eureka/
#      defaultZone: http://172.17.97.143:9001/eureka/,http://192.168.2.240:9001/eureka/
      defaultZone: http://127.0.0.1:9001/eureka/
    ####因为自己是注册中心,是否需要将自己注册给自己的注册中心(集群的时候是需要是为true)
    register-with-eureka: false
    ###因为自己是注册中心, 不需要去检索服务信息