在FeignClient整合Sentinel错误描述
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'orderService': Unsatisfied dependency expressed through field 'userClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.java.client.UserClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No fallbackFactory instance of type class cn.java.client.fallback.UserClientFallbackFactory found for feign client userservice
实现目的:
熔断降级是解决雪崩问题的重要手段。其思路是由断路器统计服务调用的异常比例、慢请求比例,如果超出阈值则会熔断该服务。即拦截访问该服务的一切请求;而当服务恢复时,断路器会放行访问该服务的请求。
#步骤实现
1、开启Feign的sentinel功能,配置文件中编写
#配置远程调用fegin配置
feign:
httpclient:
enabled: tru