spring-zuul遇到的问题

最近在研究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

猜你喜欢

转载自l7980.iteye.com/blog/2348574