diff --git a/framework-docs/modules/ROOT/pages/core/resilience.adoc b/framework-docs/modules/ROOT/pages/core/resilience.adoc index 50432b9fec7..2b519e67da3 100644 --- a/framework-docs/modules/ROOT/pages/core/resilience.adoc +++ b/framework-docs/modules/ROOT/pages/core/resilience.adoc @@ -183,9 +183,6 @@ By default, a retryable operation will be retried for any exception thrown: with 3 retry attempts (`maxRetries = 3`) after an initial failure, and a delay of 1 second between attempts. -If you only need to customize the number of retry attempts, you can use the -`RetryPolicy.withMaxRetries()` factory method as demonstrated below. - [NOTE] ==== A retryable operation will be executed at least once and retried at most `maxRetries` @@ -196,6 +193,9 @@ For example, if `maxRetries` is set to `4`, the retryable operation will be invo least once and at most 5 times. ==== +If you only need to customize the number of retry attempts, you can use the +`RetryPolicy.withMaxRetries()` factory method as demonstrated below. + [source,java,indent=0,subs="verbatim,quotes"] ---- var retryTemplate = new RetryTemplate(RetryPolicy.withMaxRetries(4)); // <1>