标签:自我保护 code VID eureka cat order 配置 provider cli
application.p8761.yml
server:
port: 8761
eureka:
server:
# 自我保护开关配置信息
enable-self-preservation: false
instance:
#服务名称
appname: provider-service
hostname: server1
client:
service-url:
defaultZone:
http://server2:8762/eureka/
application.p8762.yml
server:
port: 8762
eureka:
server:
# 自我保护开关配置信息
enable-self-preservation: false
instance:
#服务名称
appname: provider-service
hostname: server2
client:
service-url:
defaultZone:
http://server1:8761/eureka/
注意:server1 和 server2 都映射到127.0.0.1 。 defaultZone 均写对方都eureka 地址
server:
port: 80
spring:
application:
name: order-service
eureka:
client:
service-url:
defaultZone:
http://server1:8761/eureka/,http://server2:8762/eureka/
此时 高可用配置完成
标签:自我保护 code VID eureka cat order 配置 provider cli
原文地址:https://www.cnblogs.com/guhualin/p/12934001.html