美文网首页
spring cloud feign 整合 hystrix 采坑

spring cloud feign 整合 hystrix 采坑

作者: simians | 来源:发表于2019-02-21 16:59 被阅读0次
    org.springframework.beans.factory.UnsatisfiedDependencyException:
     Error creating bean with name 'userController': Unsatisfied 
    dependency expressed through field 'bookService'; nested exception 
    is org.springframework.beans.factory.BeanCreationException: Error 
    creating bean with name 
    'com.simianBook.service.feignService.BookService': FactoryBean 
    threw exception on object creation; nested exception is 
    java.lang.IllegalStateException: No fallback instance of type class 
    com.simianBook.service.feignService.hystrix.BookServiceFallBack 
    found for feign client BOOKS
    
    

    在hystrix 会点对象里添加@Component 即可解决


    解决办法

    相关文章

      网友评论

          本文标题:spring cloud feign 整合 hystrix 采坑

          本文链接:https://www.haomeiwen.com/subject/mwkdyqtx.html