常见错误整理

常见错误整理

  • SpringCloud
    • FeignClient

SpringCloud

FeignClient

Incompatible fallback instance. Fallback/fallbackFactory of type class xxx.xxx.xxx.XxxServiceFallbackFactory is not assignable to interface xxx.xxx.xxx.XxxService for feign client xxx

将 FeignClient 配置信息从上边的修改为下边的

// 错误的
@FeignClient(name = "xxx", path = "/pki", fallback = Xxx.class)
// 正确的
@FeignClient(name = "xxx", path = "/pki", fallbackFactory = Xxx.class)

你可能感兴趣的:(Java,java)