mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
24590092ef
Prior to this commit, the maximum number of retry attempts was configured via @Retryable(maxAttempts = ...), RetryPolicy.withMaxAttempts(), and RetryPolicy.Builder.maxAttempts(). However, this led to confusion for developers who were unsure if "max attempts" referred to the "total attempts" (i.e., initial attempt plus retry attempts) or only the "retry attempts". To improve the programming model, this commit renames maxAttempts to maxRetries in @Retryable and RetryPolicy.Builder and renames RetryPolicy.withMaxAttempts() to RetryPolicy.withMaxRetries(). In addition, this commit updates the documentation to consistently point out that total attempts = 1 initial attempt + maxRetries attempts. Closes gh-35772