zoukankan      html  css  js  c++  java
  • Eureka Server 集群配置

    注册中心:

    debug: true
    spring:
      application:
        name: eureka-server
    logging:
      level:
        com.netflix.eureka: 'off'
        com.netflix.discovery: 'off'
    ---
    spring:
      profiles: manager1
    server:
      port: 8100
    eureka:
      instance:
        prefer-ip-address: true #以IP地址注册到服务中心,相互注册使用IP地址
        #ip-address: 192.168.1.1 #强制指定IP地址,默认会获取本机的IP地址
      client:
        service-url:
          defaultZone: http://192.168.1.2:8100/eureka/,http://192.168.1.3:8100/eureka/
    ---
    spring:
      profiles: manager2
    server:
      port: 8100
    eureka:
      instance:
        prefer-ip-address: true
      client:
        service-url:
          defaultZone: http://192.168.1.1:8100/eureka/,http://192.168.1.3:8100/eureka/
    ---
    spring:
      profiles: manager3
    server:
      port: 8100
    eureka:
      instance:
        prefer-ip-address: true
      client:
        service-url:
          defaultZone: http://192.168.1.1:8100/eureka/,http://192.168.1.2:8100/eureka/

    微服务端:

    debug: true
    spring:
      application:
        name: eureka-client
    server:
      port: 8110
    eureka:
      instance:
        prefer-ip-address: true #以IP地址注册到服务中心
        #instance-id: http://192.168.1.4:8110 #服务中心的信息显示(如果IP地址不显示的话,进行配置)
      client:
        service-url:
          defaultZone: http://192.168.1.1:8100/eureka/,http://192.168.1.2:8100/eureka/,http://192.168.1.3:8100/eureka/
  • 相关阅读:
    C#遍历List并删除某个或者几个元素的方法
    7月清北学堂培训 Day 4
    7月清北学堂培训 Day 3
    7月清北学堂培训 Day 2
    7月清北学堂培训 Day 1
    P1383 高级打字机
    P2401 不等数列
    P1412 经营与开发
    P1314 聪明的质监员
    2019.7.9 校内测试 T3 15数码问题
  • 原文地址:https://www.cnblogs.com/tianciliangen/p/11650060.html
Copyright © 2011-2022 走看看