版本
spring boot: 2.0.1.RELEASE
spring cloud: Finchley.M9
錯誤
通過zuul調用eureka注冊的服務,錯誤內容如下
Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client xxxxx
方案
經過查詢排查,兩種解決方案
方案一(親測有效)
在application.properties中添加
ribbon.eureka.enable: true
方案二
添加依賴(已經親測有效)
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency>
原文鏈接:https://blog.csdn.net/jiadajing267/article/details/81047335