No fallback instance of type class com.seres.cloud.module.system.api.user.fallback

报这个错是因为spring容器没有找到 fallback 这个类。

1、要在fallback上面加 @Component 注解
No fallback instance of type class com.seres.cloud.module.system.api.user.fallback_第1张图片
2、对应API的 @FeignClient 注解 fallbackFactory 参数 引用fallback类
No fallback instance of type class com.seres.cloud.module.system.api.user.fallback_第2张图片

3、在启动类加上@EnableFeignClients注解, scanBasePackages 中加上对应包名路径
No fallback instance of type class com.seres.cloud.module.system.api.user.fallback_第3张图片

完成以上几步,应该是可以解决问题的

你可能感兴趣的:(Java异常,java,开发语言)