spring-framework
spring-framework copied to clipboard
Support `RetryListener` registration via `@Retryable`
It appears that the support for @Retryable is not complete.
The RetryListener API is defined but is not actually used in conjunction with @Retryable.
A new instance of RetryTemplate is created each time in AbstractRetryInterceptor when a retryable operation is called but without setting a RetryListener.
RetryPolicy retryPolicy = RetryPolicy.builder()
// ...
.build();
RetryTemplate retryTemplate = new RetryTemplate(retryPolicy);
try {
return retryTemplate.execute(new Retryable<>() {