В Spring Docs здесь предлагается, чтобы добавление Spring Retry в качестве зависимости позволило нам включить его на клиенте Spring Feign.
Однако, когда я попробую следующеекод:
@Component
@FeignClient(value = "myFeign", url = "${my.url}")
public interface ingestionInterface{
@Retryable(
value = {FeignException.class},
backoff = @Backoff(delay=50000)
)
@RequestMapping(
produces = "application/json",
method = RequestMethod.POST)
Optional<ResponseEntity<Response>> postRequest(@Valid @RequestBody Request request);
}
Мое приложение не будет скомпилировано, с ошибкой:
Bean named 'blah.blah.ingestionInterface' is expected to be of type 'blah.blah.ingestionInterface' but was actually of type 'com.sun.proxy.$Proxy143'
Если это не способ использовать Spring Retry с Spring FeignКак это должно быть использовано?