From 2517527302a303e563ba465c13c2172b4dc57877 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 24 Jul 2025 07:45:09 +0100 Subject: [PATCH] Align starters names and provide deprecated versions Ensure starters are aligned with modules and introduce deprecated versions for an easier upgrade experience. See gh-46245 --- .../spring-boot-dependencies/build.gradle | 4 +++ settings.gradle | 4 +++ .../build.gradle | 2 +- .../build.gradle | 2 +- .../build.gradle | 2 +- .../build.gradle | 2 +- .../build.gradle | 2 +- .../build.gradle | 7 ++--- .../build.gradle | 8 ++--- .../build.gradle | 6 ++-- .../build.gradle | 28 ++++++++++++++++++ .../build.gradle | 29 +++++++++++++++++++ .../build.gradle | 27 +++++++++++++++++ .../build.gradle | 25 ++++++++++++++++ starter/spring-boot-starter-web/build.gradle | 2 +- 15 files changed, 129 insertions(+), 21 deletions(-) create mode 100644 starter/spring-boot-starter-security-oauth2-authorization-server/build.gradle create mode 100644 starter/spring-boot-starter-security-oauth2-client/build.gradle create mode 100644 starter/spring-boot-starter-security-oauth2-resource-server/build.gradle create mode 100644 starter/spring-boot-starter-web-services/build.gradle diff --git a/platform/spring-boot-dependencies/build.gradle b/platform/spring-boot-dependencies/build.gradle index f53442f22c0..ba6386724ea 100644 --- a/platform/spring-boot-dependencies/build.gradle +++ b/platform/spring-boot-dependencies/build.gradle @@ -2136,6 +2136,9 @@ bom { "spring-boot-starter-restclient", "spring-boot-starter-rsocket", "spring-boot-starter-security", + "spring-boot-starter-security-oauth2-authorization-server", + "spring-boot-starter-security-oauth2-client", + "spring-boot-starter-security-oauth2-resource-server", "spring-boot-starter-security-saml2", "spring-boot-starter-sendgrid", "spring-boot-starter-session-data-mongodb", @@ -2148,6 +2151,7 @@ bom { "spring-boot-starter-undertow", "spring-boot-starter-validation", "spring-boot-starter-web", + "spring-boot-starter-web-services", "spring-boot-starter-webclient", "spring-boot-starter-webflux", "spring-boot-starter-webmvc", diff --git a/settings.gradle b/settings.gradle index 058f6b9e32d..fc4a7c4f9ec 100644 --- a/settings.gradle +++ b/settings.gradle @@ -234,6 +234,9 @@ include "starter:spring-boot-starter-reactor-netty" include "starter:spring-boot-starter-restclient" include "starter:spring-boot-starter-rsocket" include "starter:spring-boot-starter-security" +include "starter:spring-boot-starter-security-oauth2-authorization-server" +include "starter:spring-boot-starter-security-oauth2-client" +include "starter:spring-boot-starter-security-oauth2-resource-server" include "starter:spring-boot-starter-security-saml2" include "starter:spring-boot-starter-sendgrid" include "starter:spring-boot-starter-session-data-mongodb" @@ -246,6 +249,7 @@ include "starter:spring-boot-starter-tomcat" include "starter:spring-boot-starter-undertow" include "starter:spring-boot-starter-validation" include "starter:spring-boot-starter-web" +include "starter:spring-boot-starter-web-services" include "starter:spring-boot-starter-webclient" include "starter:spring-boot-starter-webflux" include "starter:spring-boot-starter-webmvc" diff --git a/smoke-test/spring-boot-smoke-test-oauth2-authorization-server/build.gradle b/smoke-test/spring-boot-smoke-test-oauth2-authorization-server/build.gradle index 73f2a46379f..bb5f3c69d4f 100644 --- a/smoke-test/spring-boot-smoke-test-oauth2-authorization-server/build.gradle +++ b/smoke-test/spring-boot-smoke-test-oauth2-authorization-server/build.gradle @@ -21,7 +21,7 @@ plugins { description = "Spring Boot OAuth2 Authorization Server smoke test" dependencies { - implementation(project(":starter:spring-boot-starter-oauth2-authorization-server")) + implementation(project(":starter:spring-boot-starter-security-oauth2-authorization-server")) testImplementation(project(":starter:spring-boot-starter-test")) testImplementation("org.apache.httpcomponents.client5:httpclient5") diff --git a/smoke-test/spring-boot-smoke-test-oauth2-client/build.gradle b/smoke-test/spring-boot-smoke-test-oauth2-client/build.gradle index cb0035428aa..f34ce4b885e 100644 --- a/smoke-test/spring-boot-smoke-test-oauth2-client/build.gradle +++ b/smoke-test/spring-boot-smoke-test-oauth2-client/build.gradle @@ -21,7 +21,7 @@ plugins { description = "Spring Boot OAuth2 Client smoke test" dependencies { - implementation(project(":starter:spring-boot-starter-oauth2-client")) + implementation(project(":starter:spring-boot-starter-security-oauth2-client")) implementation(project(":starter:spring-boot-starter-webmvc")) testImplementation(project(":starter:spring-boot-starter-test")) diff --git a/smoke-test/spring-boot-smoke-test-oauth2-resource-server/build.gradle b/smoke-test/spring-boot-smoke-test-oauth2-resource-server/build.gradle index 9df202da9ac..c849aaca2fe 100644 --- a/smoke-test/spring-boot-smoke-test-oauth2-resource-server/build.gradle +++ b/smoke-test/spring-boot-smoke-test-oauth2-resource-server/build.gradle @@ -21,7 +21,7 @@ plugins { description = "Spring Boot OAuth2 Resource Server smoke test" dependencies { - implementation(project(":starter:spring-boot-starter-oauth2-resource-server")) + implementation(project(":starter:spring-boot-starter-security-oauth2-resource-server")) implementation(project(":starter:spring-boot-starter-webmvc")) testImplementation(project(":starter:spring-boot-starter-test")) diff --git a/smoke-test/spring-boot-smoke-test-reactive-oauth2-client/build.gradle b/smoke-test/spring-boot-smoke-test-reactive-oauth2-client/build.gradle index 0ef75c546a0..67f143b5f5e 100644 --- a/smoke-test/spring-boot-smoke-test-reactive-oauth2-client/build.gradle +++ b/smoke-test/spring-boot-smoke-test-reactive-oauth2-client/build.gradle @@ -22,7 +22,7 @@ description = "Spring Boot reactive OAuth 2 client smoke test" dependencies { implementation(project(":starter:spring-boot-starter-actuator")) - implementation(project(":starter:spring-boot-starter-oauth2-client")) + implementation(project(":starter:spring-boot-starter-security-oauth2-client")) implementation(project(":starter:spring-boot-starter-webflux")) testImplementation(project(":starter:spring-boot-starter-test")) diff --git a/smoke-test/spring-boot-smoke-test-reactive-oauth2-resource-server/build.gradle b/smoke-test/spring-boot-smoke-test-reactive-oauth2-resource-server/build.gradle index 965ee344821..3ccb95ba146 100644 --- a/smoke-test/spring-boot-smoke-test-reactive-oauth2-resource-server/build.gradle +++ b/smoke-test/spring-boot-smoke-test-reactive-oauth2-resource-server/build.gradle @@ -21,7 +21,7 @@ plugins { description = "Spring Boot reactive OAuth 2 resource server smoke test" dependencies { - implementation(project(":starter:spring-boot-starter-oauth2-resource-server")) + implementation(project(":starter:spring-boot-starter-security-oauth2-resource-server")) implementation(project(":starter:spring-boot-starter-webflux")) testImplementation(project(":starter:spring-boot-starter-test")) diff --git a/starter/spring-boot-starter-oauth2-authorization-server/build.gradle b/starter/spring-boot-starter-oauth2-authorization-server/build.gradle index 4ee9a9d300e..94d9b1d3186 100644 --- a/starter/spring-boot-starter-oauth2-authorization-server/build.gradle +++ b/starter/spring-boot-starter-oauth2-authorization-server/build.gradle @@ -18,11 +18,8 @@ plugins { id "org.springframework.boot.starter" } -description = "Starter for using Spring Authorization Server features" +description = "Starter for using Spring Authorization Server features (deprecated in favor of spring-boot-starter-security-oauth2-authorization-server)" dependencies { - api(project(":starter:spring-boot-starter-security")) - api(project(":starter:spring-boot-starter-webmvc")) - - api(project(":module:spring-boot-security-oauth2-authorization-server")) + api(project(":starter:spring-boot-starter-security-oauth2-authorization-server")) } diff --git a/starter/spring-boot-starter-oauth2-client/build.gradle b/starter/spring-boot-starter-oauth2-client/build.gradle index 8901557d5b0..84a3a58b5ed 100644 --- a/starter/spring-boot-starter-oauth2-client/build.gradle +++ b/starter/spring-boot-starter-oauth2-client/build.gradle @@ -18,12 +18,8 @@ plugins { id "org.springframework.boot.starter" } -description = "Starter for using Spring Security's OAuth2/OpenID Connect client features" +description = "Starter for using Spring Security's OAuth2/OpenID Connect client features (deprecated in favor of spring-boot-starter-security-oauth2-client)" dependencies { - api(project(":starter:spring-boot-starter-security")) - - api(project(":module:spring-boot-security-oauth2-client")) - - api("org.springframework.security:spring-security-oauth2-jose") + api(project(":starter:spring-boot-starter-security-oauth2-client")) } diff --git a/starter/spring-boot-starter-oauth2-resource-server/build.gradle b/starter/spring-boot-starter-oauth2-resource-server/build.gradle index 969ba089208..93964073b1f 100644 --- a/starter/spring-boot-starter-oauth2-resource-server/build.gradle +++ b/starter/spring-boot-starter-oauth2-resource-server/build.gradle @@ -18,10 +18,8 @@ plugins { id "org.springframework.boot.starter" } -description = "Starter for using Spring Security's OAuth2 resource server features" +description = "Starter for using Spring Security's OAuth2 resource server features (deprecated in favor of spring-boot-starter-security-oauth2-resource-server)" dependencies { - api(project(":starter:spring-boot-starter-security")) - - api(project(":module:spring-boot-security-oauth2-resource-server")) + api(project(":starter:spring-boot-starter-security-oauth2-resource-server")) } diff --git a/starter/spring-boot-starter-security-oauth2-authorization-server/build.gradle b/starter/spring-boot-starter-security-oauth2-authorization-server/build.gradle new file mode 100644 index 00000000000..4ee9a9d300e --- /dev/null +++ b/starter/spring-boot-starter-security-oauth2-authorization-server/build.gradle @@ -0,0 +1,28 @@ +/* + * Copyright 2012-present 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id "org.springframework.boot.starter" +} + +description = "Starter for using Spring Authorization Server features" + +dependencies { + api(project(":starter:spring-boot-starter-security")) + api(project(":starter:spring-boot-starter-webmvc")) + + api(project(":module:spring-boot-security-oauth2-authorization-server")) +} diff --git a/starter/spring-boot-starter-security-oauth2-client/build.gradle b/starter/spring-boot-starter-security-oauth2-client/build.gradle new file mode 100644 index 00000000000..8901557d5b0 --- /dev/null +++ b/starter/spring-boot-starter-security-oauth2-client/build.gradle @@ -0,0 +1,29 @@ +/* + * Copyright 2012-present 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id "org.springframework.boot.starter" +} + +description = "Starter for using Spring Security's OAuth2/OpenID Connect client features" + +dependencies { + api(project(":starter:spring-boot-starter-security")) + + api(project(":module:spring-boot-security-oauth2-client")) + + api("org.springframework.security:spring-security-oauth2-jose") +} diff --git a/starter/spring-boot-starter-security-oauth2-resource-server/build.gradle b/starter/spring-boot-starter-security-oauth2-resource-server/build.gradle new file mode 100644 index 00000000000..969ba089208 --- /dev/null +++ b/starter/spring-boot-starter-security-oauth2-resource-server/build.gradle @@ -0,0 +1,27 @@ +/* + * Copyright 2012-present 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id "org.springframework.boot.starter" +} + +description = "Starter for using Spring Security's OAuth2 resource server features" + +dependencies { + api(project(":starter:spring-boot-starter-security")) + + api(project(":module:spring-boot-security-oauth2-resource-server")) +} diff --git a/starter/spring-boot-starter-web-services/build.gradle b/starter/spring-boot-starter-web-services/build.gradle new file mode 100644 index 00000000000..4ce5ac1771b --- /dev/null +++ b/starter/spring-boot-starter-web-services/build.gradle @@ -0,0 +1,25 @@ +/* + * Copyright 2012-present 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id "org.springframework.boot.starter" +} + +description = "Starter for using Spring Web Services (deprecated in favor of spring-boot-starter-webservices)" + +dependencies { + api(project(":starter:spring-boot-starter-webservices")) +} diff --git a/starter/spring-boot-starter-web/build.gradle b/starter/spring-boot-starter-web/build.gradle index b6b1d7de1e1..c7dfdd1576f 100644 --- a/starter/spring-boot-starter-web/build.gradle +++ b/starter/spring-boot-starter-web/build.gradle @@ -18,7 +18,7 @@ plugins { id "org.springframework.boot.starter" } -description = "Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container" +description = "Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container (deprecated in favor of spring-boot-starter-webmvc)" dependencies { api(project(":starter:spring-boot-starter-webmvc"))