springcloud2020+springboot2.4+springcloud alibaba2.2.5整合openfegin的报错问题

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘memberController’: Unsatisfied dependency expressed through field ‘couponFeign’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘com.atguigu.gulimall.member.feign.CouponFeign’: FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?

springcloud2020+springboot2.4+springcloud alibaba2.2.5整合openfegin的报错问题

 

 

 启动正常,访问还是报错

java.lang.AbstractMethodError: org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose(Ljava/lang/String;Lorg/springframework/cloud/client/loadbalancer/Request;)Lorg/springframework/cloud/client/ServiceInstance;
at org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient.execute(FeignBlockingLoadBalancerClient.java:8

版本问题

springcloud2020+springboot2.4+springcloud alibaba2.2.5整合openfegin的报错问题

 

 

 springcloud2020+springboot2.4+springcloud alibaba2.2.5整合openfegin的报错问题

 

 

 

问题解决

附录:Springboot和SpringCloud各个版本关系

springcloud2020+springboot2.4+springcloud alibaba2.2.5整合openfegin的报错问题

 

 

 

Spring Cloud Alibaba 版本

版本查询:
https://github.com/alibaba/spring-cloud-alibaba/releases

参考链接:

https://blog.csdn.net/qq_37143673/article/details/99292705

https://www.cnblogs.com/yucongblog/p/14377307.html

https://blog.csdn.net/zds18205657013/article/details/112757434

上一篇:SpringCloud LoadBalancer灰度策略实现


下一篇:一起学习设计模式--01.单例模式