spring cloud feign 整合 hystrix 采坑

2019-02-21  本文已影响0人  simians
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 即可解决


解决办法
上一篇 下一篇

猜你喜欢

热点阅读