博客
关于我
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
阅读量:794 次
发布时间:2023-02-16

本文共 685 字,大约阅读时间需要 2 分钟。

SpringCloud OpenFeign报错

No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer

问题原因:

今天的疑惑报错,我大意了啊,没有闪。使用Spring Initializr初始化项目引入了openfeign,没有在意版本。直到运行项目进行远程调用时报错

No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?

有人问我,马老师发生什么事了。我一看 噢

解决方法:

上网一番查阅资料后发现:

由于SpringCloud Feign在Hoxton.M2 RELEASED版本之后不再使用Ribbon而是使用spring-cloud-loadbalancer,所以不引入spring-cloud-loadbalancer会报错

解决方法
加入spring-cloud-loadbalancer依赖 并且在nacos中排除ribbon依赖,不然loadbalancer无效

org.springframework.cloud
spring-cloud-loadbalancer

于是本着稳如老狗的态度,将springboot和springcloud的版本全部降下来了

于是乎 成功解决。

转载地址:http://rjjfk.baihongyu.com/

你可能感兴趣的文章
nginx 配置~~~本身就是一个静态资源的服务器
查看>>
Nginx 配置服务器文件上传与下载
查看>>
Nginx 配置清单(一篇够用)
查看>>
Nginx 配置解析:从基础到高级应用指南
查看>>
Nginx 集成Zipkin服务链路追踪
查看>>
nginx 集群配置方式 静态文件处理
查看>>
nginx+php的搭建
查看>>
nginx+tomcat+memcached
查看>>
Nginx+Tomcat实现动静分离
查看>>
nginx+Tomcat性能监控
查看>>
nginx+uwsgi+django
查看>>
nginx+vsftp搭建图片服务器
查看>>
Nginx-http-flv-module流媒体服务器搭建+模拟推流+flv.js在前端html和Vue中播放HTTP-FLV视频流
查看>>
nginx-vts + prometheus 监控nginx
查看>>
nginx: [emerg] getpwnam(“www”) failed 错误处理方法
查看>>
nginx:Error ./configure: error: the HTTP rewrite module requires the PCRE library
查看>>
Nginx、HAProxy、LVS
查看>>
Nginx下配置codeigniter框架方法
查看>>
Nginx中使用expires指令实现配置浏览器缓存
查看>>
Nginx之二:nginx.conf简单配置(参数详解)
查看>>