我找不到任何有关我需要采取行动的可能性的信息。我将@Retryable 注释与@Recover 处理程序方法一起使用。像这样:
@Retryable(value = {Exception.class}, maxAttempts = 5, backoff = @Backoff(delay = 10000))
public void update(Integer id)
{
execute(id);
}
@Recover
public void recover(Exception ex)
{
logger.error("Error when updating object with id {}", id);
}
问题是我不知道如何将我的参数“id”传递给recover() 方法。有任何想法吗?提前致谢。