解决微服务No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netfl

解决微服务No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netfl

码农世界 2024-05-29 后端 73 次浏览 0个评论

一、服务启动报如下错误:

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 了吗?

二、报如上错误是因为缺少负载均衡依赖导致的,引入如下依赖即可

        
            org.springframework.cloud
            spring-cloud-starter-loadbalancer
        

不用写版本号,跟随 spring cloud 版本即可

转载请注明来自码农世界,本文标题:《解决微服务No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netfl》

百度分享代码,如果开启HTTPS请参考李洋个人博客
每一天,每一秒,你所做的决定都会改变你的人生!

发表评论

快捷回复:

评论列表 (暂无评论,73人围观)参与讨论

还没有评论,来说两句吧...

Top