最近在研究spring-cloud,研究zuul组件时发生下列错误: 
Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client: zuul-server 

解决办法就是在pom文件里添加 

<dependency>  
    <groupId>org.springframework.cloud</groupId>  
    <artifactId>spring-cloud-starter-eureka</artifactId>  
</dependency>  

我测试的是通过zuul调用eureka注册的服务,网上文章写的不全,补上缺失的部分。可以参考网上的文章然后加上这部分就可以通过zuul调用eureka服务了。 

我的示例代码在git上,不多说一切尽在代码中。 
地址:https://github.com/leozhang123/springcloud-example.git

 

http://l7980.iteye.com/blog/2348574

 

相关文章:

  • 2021-08-17
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2022-02-20
  • 2021-12-22
  • 2021-05-07
猜你喜欢
  • 2021-08-20
  • 2021-06-06
  • 2022-12-23
  • 2021-09-01
  • 2021-04-05
  • 2022-12-23
相关资源
相似解决方案