From b4304af23fa6eaef37fb81fd3434f6dc8571f0d1 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:05 +0000 Subject: [PATCH 01/17] Upgrade to Byte Buddy 1.14.12 Closes gh-39659 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index e0b1365125d..b9dbfa58a75 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -123,7 +123,7 @@ bom { ] } } - library("Byte Buddy", "1.14.11") { + library("Byte Buddy", "1.14.12") { group("net.bytebuddy") { modules = [ "byte-buddy", From 319331175aa8e00eac664f9a4b1626dd5ce2c782 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:10 +0000 Subject: [PATCH 02/17] Upgrade to Jackson Bom 2.15.4 Closes gh-39660 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 7bf2056e2de..c8c2fa47f57 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 assertjVersion=3.24.2 commonsCodecVersion=1.15 hamcrestVersion=2.2 -jacksonVersion=2.15.3 +jacksonVersion=2.15.4 junitJupiterVersion=5.9.3 kotlinVersion=1.8.22 mavenVersion=3.9.4 From 85a8364d73fd668e54bffb6edd7254e9fbe12738 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:15 +0000 Subject: [PATCH 03/17] Upgrade to jOOQ 3.18.11 Closes gh-39661 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index b9dbfa58a75..be0840ae653 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -680,7 +680,7 @@ bom { ] } } - library("jOOQ", "3.18.10") { + library("jOOQ", "3.18.11") { group("org.jooq") { modules = [ "jooq", From f45dfff08217f496ddc8818400319f4f8838d632 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:20 +0000 Subject: [PATCH 04/17] Upgrade to Postgresql 42.6.1 Closes gh-39662 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index be0840ae653..60f5e9868bd 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1103,7 +1103,7 @@ bom { ] } } - library("Postgresql", "42.6.0") { + library("Postgresql", "42.6.1") { group("org.postgresql") { modules = [ "postgresql" From 152d9832789b1a144f7d275583e158eceb3df0d4 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:20 +0000 Subject: [PATCH 05/17] Upgrade to Reactor Bom 2022.0.16 Closes gh-39456 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 60f5e9868bd..0c96a61e97d 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1217,7 +1217,7 @@ bom { ] } } - library("Reactor Bom", "2022.0.16-SNAPSHOT") { + library("Reactor Bom", "2022.0.16") { considerSnapshots() calendarName = "Reactor" group("io.projectreactor") { From 79b650543047f2bb3cb88a7bf537425416a59bf4 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:21 +0000 Subject: [PATCH 06/17] Upgrade to Spring AMQP 3.0.11 Closes gh-39457 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0c96a61e97d..e721035a007 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1382,7 +1382,7 @@ bom { ] } } - library("Spring AMQP", "3.0.11-SNAPSHOT") { + library("Spring AMQP", "3.0.11") { considerSnapshots() group("org.springframework.amqp") { imports = [ From 06f6bba0e30f997f6b906685004f63a8273b6e20 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:22 +0000 Subject: [PATCH 07/17] Upgrade to Spring Authorization Server 1.1.5 Closes gh-39458 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index e721035a007..0632cea00d5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1390,7 +1390,7 @@ bom { ] } } - library("Spring Authorization Server", "1.1.5-SNAPSHOT") { + library("Spring Authorization Server", "1.1.5") { considerSnapshots() group("org.springframework.security") { modules = [ From 0e06315956b3826a0d4882c0714c1cc06b761da5 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:22 +0000 Subject: [PATCH 08/17] Upgrade to Spring Batch 5.0.5 Closes gh-39459 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0632cea00d5..3e402c88a06 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1398,7 +1398,7 @@ bom { ] } } - library("Spring Batch", "5.0.5-SNAPSHOT") { + library("Spring Batch", "5.0.5") { considerSnapshots() group("org.springframework.batch") { imports = [ From 57d46423f7eb81d4ff61e5c2dc2afef23ec97b41 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:23 +0000 Subject: [PATCH 09/17] Upgrade to Spring Data Bom 2023.0.9 Closes gh-39460 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 3e402c88a06..8b9ac76e2fb 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1406,7 +1406,7 @@ bom { ] } } - library("Spring Data Bom", "2023.0.9-SNAPSHOT") { + library("Spring Data Bom", "2023.0.9") { considerSnapshots() calendarName = "Spring Data Release" group("org.springframework.data") { From c6c9a7c9f913a472c2b9f2b82c84ba55a40d120a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:23 +0000 Subject: [PATCH 10/17] Upgrade to Spring Framework 6.0.17 Closes gh-39461 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c8c2fa47f57..acf983594f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ junitJupiterVersion=5.9.3 kotlinVersion=1.8.22 mavenVersion=3.9.4 nativeBuildToolsVersion=0.9.28 -springFrameworkVersion=6.0.17-SNAPSHOT +springFrameworkVersion=6.0.17 tomcatVersion=10.1.18 kotlin.stdlib.default.dependency=false From d14fa83690947c802ccafd411f003fae750cb30c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:24 +0000 Subject: [PATCH 11/17] Upgrade to Spring GraphQL 1.2.5 Closes gh-39462 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 8b9ac76e2fb..32d08e83f0d 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1424,7 +1424,7 @@ bom { ] } } - library("Spring GraphQL", "1.2.5-SNAPSHOT") { + library("Spring GraphQL", "1.2.5") { considerSnapshots() group("org.springframework.graphql") { modules = [ From 6a67eea361985aa807acd5cc2031f03541305f2d Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:25 +0000 Subject: [PATCH 12/17] Upgrade to Spring Integration 6.1.6 Closes gh-39463 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 32d08e83f0d..97e4e1cb08a 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1441,7 +1441,7 @@ bom { ] } } - library("Spring Integration", "6.1.6-SNAPSHOT") { + library("Spring Integration", "6.1.6") { considerSnapshots() group("org.springframework.integration") { imports = [ From 103618269248a22038c30fa0df2edd5301a39018 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:25 +0000 Subject: [PATCH 13/17] Upgrade to Spring Kafka 3.0.14 Closes gh-39464 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 97e4e1cb08a..db424873b9d 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1449,7 +1449,7 @@ bom { ] } } - library("Spring Kafka", "3.0.14-SNAPSHOT") { + library("Spring Kafka", "3.0.14") { considerSnapshots() group("org.springframework.kafka") { modules = [ From f0da887f172251fd5001a965586cd21c9a2e0220 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:26 +0000 Subject: [PATCH 14/17] Upgrade to Spring LDAP 3.1.4 Closes gh-39465 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index db424873b9d..e99f3fa5c90 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1458,7 +1458,7 @@ bom { ] } } - library("Spring LDAP", "3.1.4-SNAPSHOT") { + library("Spring LDAP", "3.1.4") { considerSnapshots() group("org.springframework.ldap") { modules = [ From 1c5858e59f88bcd9660754b80b4f8e1153f2c8c3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:26 +0000 Subject: [PATCH 15/17] Upgrade to Spring Security 6.1.7 Closes gh-39466 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index e99f3fa5c90..a884a347463 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1485,7 +1485,7 @@ bom { ] } } - library("Spring Security", "6.1.7-SNAPSHOT") { + library("Spring Security", "6.1.7") { considerSnapshots() group("org.springframework.security") { imports = [ From 2581c5c87a28cbfc8d4381f65454ced40a0198b2 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:31 +0000 Subject: [PATCH 16/17] Upgrade to Tomcat 10.1.19 Closes gh-39663 --- gradle.properties | 2 +- .../web/embedded/tomcat/GracefulShutdown.java | 50 ++++++++++++------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index acf983594f5..0183c8f5fb1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,6 @@ kotlinVersion=1.8.22 mavenVersion=3.9.4 nativeBuildToolsVersion=0.9.28 springFrameworkVersion=6.0.17 -tomcatVersion=10.1.18 +tomcatVersion=10.1.19 kotlin.stdlib.default.dependency=false diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/GracefulShutdown.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/GracefulShutdown.java index c921cf5c94a..b94f92c6d3d 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/GracefulShutdown.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/GracefulShutdown.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package org.springframework.boot.web.embedded.tomcat; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.concurrent.CountDownLatch; import org.apache.catalina.Container; import org.apache.catalina.Service; @@ -51,32 +52,45 @@ final class GracefulShutdown { void shutDownGracefully(GracefulShutdownCallback callback) { logger.info("Commencing graceful shutdown. Waiting for active requests to complete"); - new Thread(() -> doShutdown(callback), "tomcat-shutdown").start(); + CountDownLatch shutdownUnderway = new CountDownLatch(1); + new Thread(() -> doShutdown(callback, shutdownUnderway), "tomcat-shutdown").start(); + try { + shutdownUnderway.await(); + } + catch (InterruptedException ex) { + Thread.currentThread().interrupt(); + } } - private void doShutdown(GracefulShutdownCallback callback) { - List connectors = getConnectors(); - connectors.forEach(this::close); + private void doShutdown(GracefulShutdownCallback callback, CountDownLatch shutdownUnderway) { try { - for (Container host : this.tomcat.getEngine().findChildren()) { - for (Container context : host.findChildren()) { - while (isActive(context)) { - if (this.aborted) { - logger.info("Graceful shutdown aborted with one or more requests still active"); - callback.shutdownComplete(GracefulShutdownResult.REQUESTS_ACTIVE); - return; + List connectors = getConnectors(); + connectors.forEach(this::close); + shutdownUnderway.countDown(); + try { + for (Container host : this.tomcat.getEngine().findChildren()) { + for (Container context : host.findChildren()) { + while (isActive(context)) { + if (this.aborted) { + logger.info("Graceful shutdown aborted with one or more requests still active"); + callback.shutdownComplete(GracefulShutdownResult.REQUESTS_ACTIVE); + return; + } + Thread.sleep(50); } - Thread.sleep(50); } } - } + } + catch (InterruptedException ex) { + Thread.currentThread().interrupt(); + } + logger.info("Graceful shutdown complete"); + callback.shutdownComplete(GracefulShutdownResult.IDLE); } - catch (InterruptedException ex) { - Thread.currentThread().interrupt(); + finally { + shutdownUnderway.countDown(); } - logger.info("Graceful shutdown complete"); - callback.shutdownComplete(GracefulShutdownResult.IDLE); } private List getConnectors() { From 3e46fff15cf30730557a5ff266a1118702a1240a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Feb 2024 20:09:36 +0000 Subject: [PATCH 17/17] Upgrade to Undertow 2.3.12.Final Closes gh-39664 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index a884a347463..702c72b3dd9 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1580,7 +1580,7 @@ bom { ] } } - library("Undertow", "2.3.11.Final") { + library("Undertow", "2.3.12.Final") { group("io.undertow") { modules = [ "undertow-core",