关于SpringCloud配置网关转发时出现一下啊错误:“com.netflix.zuul.exception.ZuulException: Forwarding error at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException”

com.netflix.zuul.exception.ZuulException: Forwarding error at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException

Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client: XXX

这几行是主要报原因

解决办法:

在GateWay 的Module中的pom.xml中导入以下依赖

<dependency>

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

问题解决
文章来自:https://www.cnblogs.com/xiachan/p/10705945.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3