From 802fa4d65e1f99c948a59629d4adcb4e3603e2cf Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 16 Apr 2026 23:27:59 +0200 Subject: [PATCH 1/2] Refine RetryListener example See gh-36452 --- .../modules/ROOT/pages/core/resilience.adoc | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/resilience.adoc b/framework-docs/modules/ROOT/pages/core/resilience.adoc index 8313eb28350..a186c9c81ff 100644 --- a/framework-docs/modules/ROOT/pages/core/resilience.adoc +++ b/framework-docs/modules/ROOT/pages/core/resilience.adoc @@ -70,12 +70,12 @@ Or for 4 retry attempts and an exponential back-off strategy with a bit of jitte [source,java,indent=0,subs="verbatim,quotes"] ---- @Retryable( - includes = MessageDeliveryException.class, - maxRetries = 4, - delay = 100, - jitter = 10, - multiplier = 2, - maxDelay = 1000) + includes = MessageDeliveryException.class, + maxRetries = 4, + delay = 100, + jitter = 10, + multiplier = 2, + maxDelay = 1000) public void sendNotification() { this.jmsClient.destination("notifications").send(...); } @@ -324,7 +324,7 @@ outcome of all attempts: [source,java,indent=0,subs="verbatim,quotes"] ---- try { - var result = new RetryTemplate().execute(() -> { + var result = retryTemplate.execute(() -> { jmsClient.destination("notifications").send(...); return "result"; }); @@ -335,16 +335,21 @@ outcome of all attempts: ---- A {spring-framework-api}/core/retry/RetryListener.html[`RetryListener`] can be registered -with a `RetryTemplate` to react to events published during key retry phases (before a -retry attempt, after a retry attempt, etc.), being able to track all invocation attempts -and all exceptions coming out of the callback. This is particularly useful when using -`invoke` where no retry state other than the last original exception is exposed otherwise: +with a `RetryTemplate` to react to key retry steps (before or after a retry attempt etc.) +or simply to every invocation attempt, being able to track all exceptions coming out of +the callback and all retry outcomes (exhaustion, interruption, timeout). This is +particularly useful when using `invoke` where no retry state other than the last +original exception is exposed otherwise: [source,java,indent=0,subs="verbatim,quotes"] ---- var retryTemplate = new RetryTemplate(); - retryTemplate.setRetryPolicy(...); - retryTemplate.setRetryListener(...); + retryTemplate.setRetryListener(new RetryListener() { + @Override + public void onRetryableExecution(RetryPolicy retryPolicy, Retryable retryable, RetryState retryState) { + ... + } + }); retryTemplate.invoke( () -> jmsClient.destination("notifications").send(...)); From 91852546d92aeeae933ad77f8c938d4cfd9b0305 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 16 Apr 2026 23:28:46 +0200 Subject: [PATCH 2/2] Upgrade to Reactor 2025.0.5 and Micrometer 1.16.5 Includes Hibernate ORM 7.2.11 Closes gh-36658 Closes gh-36659 --- framework-platform/framework-platform.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework-platform/framework-platform.gradle b/framework-platform/framework-platform.gradle index 80cdf050a02..986fed60b25 100644 --- a/framework-platform/framework-platform.gradle +++ b/framework-platform/framework-platform.gradle @@ -8,9 +8,9 @@ javaPlatform { dependencies { api(platform("com.fasterxml.jackson:jackson-bom:2.20.2")) - api(platform("io.micrometer:micrometer-bom:1.16.4")) + api(platform("io.micrometer:micrometer-bom:1.16.5")) api(platform("io.netty:netty-bom:4.2.12.Final")) - api(platform("io.projectreactor:reactor-bom:2025.0.4")) + api(platform("io.projectreactor:reactor-bom:2025.0.5")) api(platform("io.rsocket:rsocket-bom:1.1.5")) api(platform("org.apache.groovy:groovy-bom:5.0.5")) api(platform("org.apache.logging.log4j:log4j-bom:2.25.4")) @@ -120,7 +120,7 @@ dependencies { api("org.glassfish:jakarta.el:4.0.2") api("org.graalvm.sdk:graal-sdk:22.3.1") api("org.hamcrest:hamcrest:3.0") - api("org.hibernate.orm:hibernate-core:7.2.10.Final") + api("org.hibernate.orm:hibernate-core:7.2.11.Final") api("org.hibernate.validator:hibernate-validator:9.1.0.Final") api("org.hsqldb:hsqldb:2.7.4") api("org.htmlunit:htmlunit:4.21.0")