运行错误:No fallback instance of type class XXX found for feign client YYY

问题出现

项目在编译的过程没有任何错误,当运行的时候抛出以下错误

 Error creating bean with name 'XXX': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No fallback instance of type class XXX found for feign client XXX

问题原因

缺少注解@Component,bean没有实例化,所以报错

解决

在fallback类上添加注解@Component,重启即可

PS:

1、欢迎访问我的个人站点:小白求学进阶

2、欢迎访问我的CSDN博客:小白求学进阶

3、微信公众号:

4、本文为原创文章,转载还需本人同意~谢谢

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×