SpringCloud-EurekaServer集群搭建笔记

1.创建两个eurekaServer项目,参考https://blog.csdn.net/futher065/article/details/120991111

2.修改application.yml

#指定应⽤名称
spring:
 application:
    name: eurekaserver
server:
  port: 8761
eureka:
 instance:
 hostname: eurekaservera
 client:
 register-with-eureka: true
 fetch-registry: true
 serviceUrl:
 defaultZone: http://eurekaserverb:8762/eureka

--第二个server
#指定应⽤名称
spring:
 application:
    name: eurekaserver
server:
  port: 8762
eureka:
 instance:
 hostname: eurekaserverb
 client:
 register-with-eureka: true
 fetch-registry: true
 serviceUrl:
 defaultZone: http://eurekaservera:8761/eureka

你可能感兴趣的:(spring,cloud,eureka,云原生)