报错信息如下:Fallback factory must produce instances of fallback classes that implement the interface annotated by @FeignClient。
代码如下:
@FeignClient(contextId = "remoteWfProallowSimpleService", value = ServiceNameConstants.OA_CONTRACT, fallbackFactory = RemoteWfProallowSimpleFallbackFactory.class, path = "/wfProallowSimple")
public interface RemoteWfProallowSimpleService {
@GetMapping("/getWfProallowSimpleInfo/{id}")
R<OaWfProallowSimple> getWfProallowSimpleInfo(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
解决方案:查看 @FeignClient,fallbackFactory属性 指定的服务降级处理是否正确、是否存在!