eureka集群

1.修改host

找到C:\Windows\System32\drivers\etc路径下的hosts文件,加上这么两行

127.0.0.1 eureka7001.com

127.0.0.1 eureka7002.com

2.修改yml

以前是单机,搂一搂

server:
  port: 7001

eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/

 

posted @ 2021-05-04 19:43  常熟阿诺  阅读(51)  评论(0编辑  收藏  举报