0

Last working version was 1.3.4 which has some vulnerabilities, for this reason updated latest version

<dependency>
    <groupId>org.springframework.retry</groupId>
    <artifactId>spring-retry</artifactId>
    <version>2.0.0</version>
</dependency>

Not possible to use @EnableRetry, @Recover, @Retryable and @Backoff.

@EnableRetry
@SpringBootApplication
public class Application {
    
    @Retryable(maxAttempts = 4, backoff = @Backoff(delay = 5000))
    public void dataTransform() {
            ........
        }
}
cannot access org.springframework.retry.annotation.Backoff
cannot access org.springframework.retry.annotation.EnableRetry
cannot access org.springframework.retry.annotation.Recover
cannot access org.springframework.retry.annotation.Retryable

Could you please help me about it?

1 Answers1

2

This is caused by a Java version mismatch. I came across the same issue with my Java 14 project, but spring-retry-2.0.0 needs Java 17

https://repo1.maven.org/maven2/org/springframework/retry/spring-retry/2.0.0/spring-retry-2.0.0.pom

<java.version>17</java.version>
dcalde
  • 106
  • 10