feign调用 fallback调用时启动报错,请问如何解决,将fallback注释了就可以进行正常启动

Blade 未结 4 5637
a756684713
a756684713 2019-06-05 11:14

Error creating bean with name 'deptController' defined in file [E:\IdeaWordSpace\SafetyStandards\blade-service\blade-system\target\classes\org\springblade\system\controller\DeptController.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springblade.anbiao.guanlijigouherenyuan.feign.IOrganizationsClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No fallback instance of type class org.springblade.anbiao.guanlijigouherenyuan.feign.IOrganizationsClientBack found for feign client blade-anbiao


4条回答
  •  小迷
    小迷 (楼主)
    2020-03-19 10:06

    使用idea的Build > Rebuild Project, 而不是平时用的Build Project(Ctrl + F9), 可以解决问题. 原因是, Build只会编译被修改了的文件, 但这次, 涉及注解里的内容, 需要强行把所有的classes重新生成. 只有Rebuild Project才有这个效果.

提交回复