server: port:9001#服务端口 eureka: instance: hostname:peer1 client: register-with-eureka:false#是否将eureka自身作为应用注册到eureka注册中心 fetch-registry:false#为true时,可以启动,但报异常:Cannot execute request on any known server serviceUrl: defaultZone:http://peer2:9002/eureka/,http://peer3:9003/eureka/ server: enable-self-preservation:false
peer2
1 2 3 4 5 6 7 8 9 10 11 12
server: port:9002#服务端口 eureka: instance: hostname:peer2 client: register-with-eureka:false#是否将eureka自身作为应用注册到eureka注册中心 fetch-registry:false#为true时,可以启动,但报异常:Cannot execute request on any known server serviceUrl: defaultZone:http://peer1:9001/eureka/,http://peer3:9003/eureka/ server: enable-self-preservation:false
peer3
1 2 3 4 5 6 7 8 9 10 11 12
server: port:9003#服务端口 eureka: instance: hostname:peer3 client: register-with-eureka:false#是否将eureka自身作为应用注册到eureka注册中心 fetch-registry:false#为true时,可以启动,但报异常:Cannot execute request on any known server serviceUrl: defaultZone:http://peer1:9001/eureka/,http://peer2:9002/eureka/ server: enable-self-preservation:false