Skip to content

Commit 35f3936

Browse files
authored
Update to support Spring Boot 4 (#47330)
* fix: suppress deprecation warnings for Spring Framework 7.0 @Nullable/@nonnull annotations * replace ListenableFutureCallback * add spring-boot-persistence and replace * fix ConfigurableBootstrapContext/EnvironmentPostProcessor path * replace with spring-boot-kafka * remove alwaysApplyingWhenNonNull() * replace with spring-boot-data-redis * replace with spring-boot-jms * replace with spring-boot-jdbc * add spring-boot-restclient * add spring-boot-security * add spring-boot-jackson * add spring-boot-http-converter * replace new OAuth2ClientAutoConfiguration * replace containsKey with containsHeader * add spring-boot-health * replace spring-boot-starter-web with spring-boot-starter-webmvc * replace org.springframework.data.util.TypeInformation with org.springframework.data.core.TypeInformation * replace with ParametersSource.of() * replace QueryMethodEvaluationContextProvider with ValueExpressionDelegate * replace ClassTypeInformation.from with TypeInformation.of * Migrate azure-spring-data-cosmos tests from JUnit 4 to JUnit 5 (#47346) * skip monitor for not support Spring Boot 4 * replace with jackson2 * replace spring.jms.listener.concurrency with spring.jms.listener.minConcurrency * Add jackson-databind
1 parent bfa1112 commit 35f3936

File tree

310 files changed

+3651
-3214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+3651
-3214
lines changed

.vscode/cspell.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,7 @@
10911091
"itest",
10921092
"itests",
10931093
"jaas",
1094+
"jandex",
10941095
"janino",
10951096
"jaspi",
10961097
"jaxb",
@@ -1110,6 +1111,7 @@
11101111
"jooq",
11111112
"jpamodelgen",
11121113
"jspc",
1114+
"jspecify",
11131115
"jstl",
11141116
"jtds",
11151117
"jvnet",
@@ -1191,15 +1193,19 @@
11911193
"uberjar",
11921194
"ultraq",
11931195
"unboundid",
1196+
"uring",
11941197
"vavr",
11951198
"vertx",
11961199
"vibur",
11971200
"wadl",
11981201
"weaviate",
1202+
"webauthn",
11991203
"webmvc",
12001204
"xerial",
1205+
"xmlparserv",
12011206
"xmpp",
12021207
"xsom",
1208+
"xtend",
12031209
"yasson",
12041210
"yugabytedb",
12051211
"zaxxer",

eng/lintingconfigs/revapi/track2/revapi.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,36 @@
340340
"old" : "interface com.azure.spring.cloud.autoconfigure.jms.ServiceBusJmsConnectionFactoryCustomizer",
341341
"justification" : "Remove deprecated method"
342342
},
343+
{
344+
"code" : "java.method.parameterTypeChanged",
345+
"old" : "parameter void com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T>::<init>(===org.springframework.data.util.TypeInformation<T>===)",
346+
"new" : "parameter void com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T>::<init>(===org.springframework.data.core.TypeInformation<T>===)",
347+
"justification" : "Replace deprecated parameterType"
348+
},
349+
{
350+
"code" : "java.method.parameterTypeChanged",
351+
"old" : "parameter <T> com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T> com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext::createPersistentEntity(===org.springframework.data.util.TypeInformation<T>===)",
352+
"new" : "parameter <T> com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T> com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext::createPersistentEntity(===org.springframework.data.core.TypeInformation<T>===)",
353+
"justification" : "Replace deprecated parameterType"
354+
},
355+
{
356+
"code" : "java.method.parameterTypeChanged",
357+
"old" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.QueryMethodEvaluationContextProvider===)",
358+
"new" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.ValueExpressionDelegate===)",
359+
"justification" : "Replace deprecated parameterType"
360+
},
361+
{
362+
"code" : "java.method.parameterTypeChanged",
363+
"old" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.QueryMethodEvaluationContextProvider===)",
364+
"new" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.ValueExpressionDelegate===)",
365+
"justification" : "Replace deprecated parameterType"
366+
},
367+
{
368+
"code" : "java.method.parameterTypeChanged",
369+
"old" : "parameter void com.azure.spring.integration.core.handler.DefaultMessageHandler::setSendCallback(===org.springframework.util.concurrent.ListenableFutureCallback<java.lang.Void>===)",
370+
"new" : "parameter void com.azure.spring.integration.core.handler.DefaultMessageHandler::setSendCallback(===java.util.function.BiConsumer<java.lang.Void, java.lang.Throwable>===)",
371+
"justification" : "Replace deprecated parameterType"
372+
},
343373
{
344374
"code": "java.method.numberOfParametersChanged",
345375
"old": {

eng/versioning/external_dependencies.txt

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -298,104 +298,104 @@ resourcemanager_com.jcraft:jsch;0.1.55
298298
storage_com.microsoft.azure:azure-storage;8.6.6
299299

300300
# sdk\spring\pom.xml modules
301-
springboot3_com.diffplug.spotless:spotless-maven-plugin;2.30.0
302-
springboot3_com.fasterxml.jackson.core:jackson-annotations;2.19.2
303-
springboot3_com.fasterxml.jackson.core:jackson-core;2.19.2
304-
springboot3_com.fasterxml.jackson.core:jackson-databind;2.19.2
305-
springboot3_com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.19.2
306-
springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.19.2
307-
springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.19.2
308-
springboot3_com.fasterxml.jackson.module:jackson-module-afterburner;2.19.2
309-
springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;2.19.2
310-
springboot3_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0
311-
springboot3_com.google.code.findbugs:jsr305;3.0.2
312-
springboot3_com.mysql:mysql-connector-j;9.4.0
313-
springboot3_com.nimbusds:nimbus-jose-jwt;9.37.3
314-
springboot3_io.lettuce:lettuce-core;6.6.0.RELEASE
315-
springboot3_io.micrometer:micrometer-core;1.15.3
316-
springboot3_io.netty:netty-buffer;4.1.124.Final
317-
springboot3_io.netty:netty-codec-http;4.1.124.Final
318-
springboot3_io.netty:netty-common;4.1.124.Final
319-
springboot3_io.netty:netty-handler;4.1.124.Final
320-
springboot3_io.netty:netty-transport-native-epoll;4.1.124.Final
321-
springboot3_io.netty:netty-transport-native-kqueue;4.1.124.Final
322-
springboot3_io.netty:netty-transport;4.1.124.Final
323-
springboot3_io.projectreactor.netty:reactor-netty;1.2.9
324-
springboot3_io.projectreactor:reactor-test;3.7.9
325-
springboot3_jakarta.servlet:jakarta.servlet-api;6.0.0
326-
springboot3_jakarta.validation:jakarta.validation-api;3.0.2
327-
springboot3_javax.annotation:javax.annotation-api;1.3.2
328-
springboot3_net.bytebuddy:byte-buddy-agent;1.17.7
329-
springboot3_net.bytebuddy:byte-buddy;1.17.7
330-
springboot3_org.apache.commons:commons-lang3;3.17.0
331-
springboot3_org.apache.kafka:kafka-clients;3.9.1
332-
springboot3_org.apache.maven.plugins:maven-antrun-plugin;3.1.0
333-
springboot3_org.apache.maven.plugins:maven-compiler-plugin;3.14.0
334-
springboot3_org.apache.maven.plugins:maven-enforcer-plugin;3.5.0
335-
springboot3_org.apache.maven.plugins:maven-failsafe-plugin;3.5.3
336-
springboot3_org.apache.maven.plugins:maven-jar-plugin;3.4.2
337-
springboot3_org.apache.maven.plugins:maven-javadoc-plugin;3.11.3
338-
springboot3_org.apache.maven.plugins:maven-surefire-plugin;3.5.3
339-
springboot3_org.assertj:assertj-core;3.27.4
340-
springboot3_org.hibernate.validator:hibernate-validator;8.0.3.Final
341-
springboot3_org.javatuples:javatuples;1.2
342-
springboot3_org.junit.jupiter:junit-jupiter;5.12.2
343-
springboot3_org.messaginghub:pooled-jms;3.1.7
344-
springboot3_org.mockito:mockito-core;5.17.0
345-
springboot3_org.postgresql:postgresql;42.7.7
346-
springboot3_org.revapi:revapi-maven-plugin;0.14.6
347-
springboot3_org.slf4j:slf4j-api;2.0.17
348-
springboot3_org.slf4j:slf4j-simple;2.0.17
349-
springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;3.5.5
350-
springboot3_org.springframework.boot:spring-boot-actuator;3.5.5
351-
springboot3_org.springframework.boot:spring-boot-autoconfigure;3.5.5
352-
springboot3_org.springframework.boot:spring-boot-configuration-metadata;3.5.5
353-
springboot3_org.springframework.boot:spring-boot-configuration-processor;3.5.5
354-
springboot3_org.springframework.boot:spring-boot-docker-compose;3.5.5
355-
springboot3_org.springframework.boot:spring-boot-starter-actuator;3.5.5
356-
springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;3.5.5
357-
springboot3_org.springframework.boot:spring-boot-starter-integration;3.5.5
358-
springboot3_org.springframework.boot:spring-boot-starter-parent;3.5.5
359-
springboot3_org.springframework.boot:spring-boot-starter-test;3.5.5
360-
springboot3_org.springframework.boot:spring-boot-starter-web;3.5.5
361-
springboot3_org.springframework.boot:spring-boot-starter;3.5.5
362-
springboot3_org.springframework.boot:spring-boot-test;3.5.5
363-
springboot3_org.springframework.boot:spring-boot-testcontainers;3.5.5
364-
springboot3_org.springframework.cloud:spring-cloud-bus;4.3.0
365-
springboot3_org.springframework.cloud:spring-cloud-context;4.3.0
366-
springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;4.3.0
367-
springboot3_org.springframework.cloud:spring-cloud-stream-test-binder;4.3.0
368-
springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0
369-
springboot3_org.springframework.data:spring-data-commons;3.5.3
370-
springboot3_org.springframework.data:spring-data-redis;3.5.3
371-
springboot3_org.springframework.integration:spring-integration-core;6.5.1
372-
springboot3_org.springframework.kafka:spring-kafka;3.3.9
373-
springboot3_org.springframework.retry:spring-retry;2.0.12
374-
springboot3_org.springframework.security:spring-security-config;6.5.3
375-
springboot3_org.springframework.security:spring-security-oauth2-client;6.5.3
376-
springboot3_org.springframework.security:spring-security-oauth2-jose;6.5.3
377-
springboot3_org.springframework.security:spring-security-oauth2-resource-server;6.5.3
378-
springboot3_org.springframework.security:spring-security-web;6.5.3
379-
springboot3_org.springframework:spring-beans;6.2.10
380-
springboot3_org.springframework:spring-context-support;6.2.10
381-
springboot3_org.springframework:spring-context;6.2.10
382-
springboot3_org.springframework:spring-core-test;6.2.10
383-
springboot3_org.springframework:spring-core;6.2.10
384-
springboot3_org.springframework:spring-expression;6.2.10
385-
springboot3_org.springframework:spring-jdbc;6.2.10
386-
springboot3_org.springframework:spring-jms;6.2.10
387-
springboot3_org.springframework:spring-messaging;6.2.10
388-
springboot3_org.springframework:spring-test;6.2.10
389-
springboot3_org.springframework:spring-tx;6.2.10
390-
springboot3_org.springframework:spring-web;6.2.10
391-
springboot3_org.springframework:spring-webmvc;6.2.10
392-
springboot3_org.testcontainers:junit-jupiter;1.21.3
393-
springboot3_org.testcontainers:azure;1.21.3
394-
springboot3_jakarta.annotation:jakarta.annotation-api;3.0.0
395-
springboot3_ch.qos.logback:logback-classic;1.5.18
301+
springboot4_com.diffplug.spotless:spotless-maven-plugin;2.30.0
302+
springboot4_com.fasterxml.jackson.core:jackson-annotations;2.20
303+
springboot4_com.fasterxml.jackson.core:jackson-databind;2.20.1
304+
springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1
305+
springboot4_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1
306+
springboot4_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0
307+
springboot4_com.google.code.findbugs:jsr305;3.0.2
308+
springboot4_com.mysql:mysql-connector-j;9.5.0
309+
springboot4_com.nimbusds:nimbus-jose-jwt;9.37.3
310+
springboot4_io.lettuce:lettuce-core;6.8.1.RELEASE
311+
springboot4_io.micrometer:micrometer-core;1.16.0
312+
springboot4_io.netty:netty-buffer;4.2.7.Final
313+
springboot4_io.netty:netty-codec-http;4.2.7.Final
314+
springboot4_io.netty:netty-common;4.2.7.Final
315+
springboot4_io.netty:netty-handler;4.2.7.Final
316+
springboot4_io.netty:netty-transport-native-epoll;4.2.7.Final
317+
springboot4_io.netty:netty-transport-native-kqueue;4.2.7.Final
318+
springboot4_io.netty:netty-transport;4.2.7.Final
319+
springboot4_io.projectreactor.netty:reactor-netty;1.3.0
320+
springboot4_io.projectreactor:reactor-test;3.8.0
321+
springboot4_jakarta.servlet:jakarta.servlet-api;6.1.0
322+
springboot4_jakarta.validation:jakarta.validation-api;3.1.1
323+
springboot4_javax.annotation:javax.annotation-api;1.3.2
324+
springboot4_net.bytebuddy:byte-buddy-agent;1.17.8
325+
springboot4_net.bytebuddy:byte-buddy;1.17.8
326+
springboot4_org.apache.commons:commons-lang3;3.19.0
327+
springboot4_org.apache.kafka:kafka-clients;4.1.1
328+
springboot4_org.apache.maven.plugins:maven-antrun-plugin;3.2.0
329+
springboot4_org.apache.maven.plugins:maven-compiler-plugin;3.14.1
330+
springboot4_org.apache.maven.plugins:maven-enforcer-plugin;3.6.2
331+
springboot4_org.apache.maven.plugins:maven-failsafe-plugin;3.5.4
332+
springboot4_org.apache.maven.plugins:maven-jar-plugin;3.4.2
333+
springboot4_org.apache.maven.plugins:maven-javadoc-plugin;3.12.0
334+
springboot4_org.apache.maven.plugins:maven-surefire-plugin;3.5.4
335+
springboot4_org.assertj:assertj-core;3.27.6
336+
springboot4_org.hibernate.validator:hibernate-validator;9.0.1.Final
337+
springboot4_org.javatuples:javatuples;1.2
338+
springboot4_org.junit.jupiter:junit-jupiter;6.0.1
339+
springboot4_org.messaginghub:pooled-jms;3.1.7
340+
springboot4_org.mockito:mockito-core;5.20.0
341+
springboot4_org.postgresql:postgresql;42.7.8
342+
springboot4_org.revapi:revapi-maven-plugin;0.14.6
343+
springboot4_org.slf4j:slf4j-api;2.0.17
344+
springboot4_org.slf4j:slf4j-simple;2.0.17
345+
springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0
346+
springboot4_org.springframework.boot:spring-boot-actuator;4.0.0
347+
springboot4_org.springframework.boot:spring-boot-autoconfigure;4.0.0
348+
springboot4_org.springframework.boot:spring-boot-configuration-metadata;4.0.0
349+
springboot4_org.springframework.boot:spring-boot-configuration-processor;4.0.0
350+
springboot4_org.springframework.boot:spring-boot-data-redis;4.0.0
351+
springboot4_org.springframework.boot:spring-boot-docker-compose;4.0.0
352+
springboot4_org.springframework.boot:spring-boot-health;4.0.0
353+
springboot4_org.springframework.boot:spring-boot-http-converter;4.0.0
354+
springboot4_org.springframework.boot:spring-boot-jackson2;4.0.0
355+
springboot4_org.springframework.boot:spring-boot-jdbc;4.0.0
356+
springboot4_org.springframework.boot:spring-boot-jms;4.0.0
357+
springboot4_org.springframework.boot:spring-boot-kafka;4.0.0
358+
springboot4_org.springframework.boot:spring-boot-persistence;4.0.0
359+
springboot4_org.springframework.boot:spring-boot-restclient;4.0.0
360+
springboot4_org.springframework.boot:spring-boot-resttestclient;4.0.0
361+
springboot4_org.springframework.boot:spring-boot-security;4.0.0
362+
springboot4_org.springframework.boot:spring-boot-security-oauth2-client;4.0.0
363+
springboot4_org.springframework.boot:spring-boot-security-oauth2-resource-server;4.0.0
364+
springboot4_org.springframework.boot:spring-boot-starter-actuator;4.0.0
365+
springboot4_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0
366+
springboot4_org.springframework.boot:spring-boot-starter-integration;4.0.0
367+
springboot4_org.springframework.boot:spring-boot-starter-parent;4.0.0
368+
springboot4_org.springframework.boot:spring-boot-starter-test;4.0.0
369+
springboot4_org.springframework.boot:spring-boot-starter-webmvc;4.0.0
370+
springboot4_org.springframework.boot:spring-boot-starter;4.0.0
371+
springboot4_org.springframework.boot:spring-boot-test;4.0.0
372+
springboot4_org.springframework.boot:spring-boot-testcontainers;4.0.0
373+
springboot4_org.springframework.cloud:spring-cloud-bus;5.0.0
374+
springboot4_org.springframework.cloud:spring-cloud-context;5.0.0
375+
springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;5.0.0
376+
springboot4_org.springframework.cloud:spring-cloud-stream-test-binder;5.0.0
377+
springboot4_org.springframework.cloud:spring-cloud-stream;5.0.0
378+
springboot4_org.springframework.data:spring-data-commons;4.0.0
379+
springboot4_org.springframework.integration:spring-integration-core;7.0.0
380+
springboot4_org.springframework.retry:spring-retry;2.0.12
381+
springboot4_org.springframework:spring-beans;7.0.1
382+
springboot4_org.springframework:spring-context-support;7.0.1
383+
springboot4_org.springframework:spring-context;7.0.1
384+
springboot4_org.springframework:spring-core-test;7.0.1
385+
springboot4_org.springframework:spring-core;7.0.1
386+
springboot4_org.springframework:spring-expression;7.0.1
387+
springboot4_org.springframework:spring-messaging;7.0.1
388+
springboot4_org.springframework:spring-test;7.0.1
389+
springboot4_org.springframework:spring-tx;7.0.1
390+
springboot4_org.springframework:spring-web;7.0.1
391+
springboot4_org.springframework:spring-webmvc;7.0.1
392+
springboot4_org.testcontainers:junit-jupiter;1.21.3
393+
springboot4_org.testcontainers:azure;1.21.3
394+
springboot4_jakarta.annotation:jakarta.annotation-api;3.0.0
395+
springboot4_ch.qos.logback:logback-classic;1.5.21
396396
# Used for Spring version updates
397-
springboot3_org.springframework.boot:spring-boot-dependencies;3.5.5
398-
springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.0.0
397+
springboot4_org.springframework.boot:spring-boot-dependencies;4.0.0
398+
springboot4_org.springframework.cloud:spring-cloud-dependencies;2025.1.0
399399

400400
# Java 7 support
401401

eng/versioning/find_unused_dependencies.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from utils import load_version_map_from_file
1010
from utils import version_update_marker
1111

12-
IGNORED_DEPENDENCIES = {'springboot3_org.springframework.boot:spring-boot-dependencies',
13-
'springboot3_org.springframework.cloud:spring-cloud-dependencies'}
12+
IGNORED_DEPENDENCIES = {'springboot4_org.springframework.boot:spring-boot-dependencies',
13+
'springboot4_org.springframework.cloud:spring-cloud-dependencies'}
1414

1515
def fixup_version_map(version_file, version_map):
1616
# uses the util function to load the version map from the file, then adds a bool to each entry to track if it is visisted
@@ -64,4 +64,4 @@ def main():
6464
exit(1)
6565

6666
if __name__ == "__main__":
67-
main()
67+
main()

sdk/spring/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Release History
2+
# (Unreleased)
3+
Upgrade Spring Boot dependencies version to 4.0.0 and Spring Cloud dependencies version to 2025.1.0
24

35
## 6.1.0 (2025-12-16)
46
- This release is compatible with Spring Boot 3.5.0-3.5.8. (Note: 3.5.x (x>8) should be supported, but they aren't tested with this release.)

0 commit comments

Comments
 (0)