feign熔断错误:org.springframework.beans.factory.UnsatisfiedDependencyException...

Jenkins部署服务遇到如下错误(xxx这里隐去项目中的文件,大致错误类型相似的同学,可参考以下解决办法):
org.springframework.beans.factory.UnsatisfiedDependencyException…

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxx': Unsatisfied dependency expressed through field 'xxx'; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxx': Unsatisfied dependency expressed through field 'xxxx'; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.xxx.forward.client.feignclient.xxx': FactoryBean threw exception on object creation; 
nested exception is java.lang.IllegalStateException: Incompatible fallbackFactory instance for feign client byh-doctor-basedata. Factory produces instances of 'class com.xxx.forward.client.fallback.xxx$1', but should produce instances of 'interface com.xxx.forward.client.feignclient.xxx'

这是在springCloud项目中调用feign遇到的问题,解决方法:找到.yml文件,找到feign熔断处,把hystrix下的enabled开关由 true 修改为 false 即可。
原文件:

feign:
  hystrix:
    enabled: true # 开启Feign熔断

修改文件:

feign:
 hystrix:
   enabled: false # 开启Feign熔断

你可能感兴趣的:(feign熔断错误:org.springframework.beans.factory.UnsatisfiedDependencyException...)