启动SpringCloudEureka 报异常
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
原因是 Eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为。
在application.yml 添加配置:
server:
port: 8761
eureka:
client:
registerWithEureka: false
fetchRegistry: false
server:
waitTimeInMsWhenSyncEmpty: 0