java负载均衡解决方案_SpringCloud微服务(Fegin负载均衡遇到的问题和解决方案)...

本文介绍了在使用SpringCloud Fegin进行负载均衡时遇到的问题,包括缺少`spring-boot-starter-web`依赖导致的负载均衡失败,以及由于返回类型不匹配引发的DecodeException。提供了解决方案,并分享了详细的错误日志和参考资料链接,欢迎读者留言交流。
摘要由CSDN通过智能技术生成

Completed shut down of DiscoveryClient

You already have RibbonLoadBalancerClient on your classpath. It will be used by default. As Spring Cloud Ribbon is in maintenance mode. We recommend switching to BlockingLoadBalancerClient instead. In order to use it, set the value of `spring.cloud.loadbalancer.ribbon.enabled` to `false` or remove spring-cloud-starter-netflix-ribbon from your project.

3ae0e57f70591dd8de0f66e3d8f803f6.png

原因:缺少web依赖

org.springframework.boot

spring-boot-starter-web

负载均衡失败

2020-08-11 14:37:20.331 ERROR 17764 --- [nio-8083-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.codec.DecodeException: Could not extract response: no suitable HttpMessageConverter found for response type [java.util.List] and content type [text/plain;charset=UTF-8]] with root cause

27b3ab008191231b1b85a79aec46da29.png

原因:编写逻辑代码返回类型未对应

本文地址:https://blog.csdn.net/qq_37334150/article/details/108254914

希望与广大网友互动??

点此进行留言吧!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值