For years, retrying a flaky call in Spring meant adding spring-retry and spring-boot-starter-aop, then putting @EnableRetry on a config class. Some teams went further and pulled in Resilience4j just to retry one HTTP call.
Spring Framework 7, which Spring Boot 4 is built on, has retries in its core. The annotation is still called @Retryable, but it lives in a new package, takes different attributes, and needs no extra dependency. Next to it sits @ConcurrencyLimit, which caps how many threads can run a method at the same time.
This post sets both up on a small service and proves each behavior with a test. All five tests pass on Spring Boot 4.1.2.…