一、服务启动报如下错误:
1、报错
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
2、报错
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netflix-ribbon
提示:
没有loadBalancing定义的feign客户端。忘了加入 spring-cloud-starter-loadbalancer或spring-cloud-starter-netflix-ribbon 了吗?
二、报如上错误是因为缺少负载均衡依赖导致的,引入如下依赖即可文章来源:https://www.toymoban.com/news/detail-706837.html
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
不用写版本号,跟随 spring cloud 版本即可文章来源地址https://www.toymoban.com/news/detail-706837.html
到了这里,关于解决微服务No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netfl的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!