diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java index 5e602e15695..6083494c2d6 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java @@ -16,9 +16,6 @@ package org.springframework.boot.build.bom; -import java.net.URI; -import java.net.URISyntaxException; - import javax.inject.Inject; import org.apache.hc.client5.http.config.RequestConfig; @@ -37,7 +34,6 @@ import org.springframework.boot.build.bom.Library.LinkType; import org.springframework.boot.build.bom.Library.LinkedVersion; import org.springframework.boot.build.bom.ResolvedBom.ResolvedLibrary; import org.springframework.boot.build.bom.bomr.version.DependencyVersion; -import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestClient; import org.springframework.web.client.RestClient.ResponseSpec.ErrorHandler; @@ -90,15 +86,20 @@ public abstract class CheckLinks extends DefaultTask { } private void check(RestClient restClient, LinkType type, Link link, String name, Object version) { - try { - URI uri = new URI(link.url(new LinkedVersion(version))); - ResponseEntity response = restClient.head().uri(uri).retrieve().toEntity(String.class); - int statusCode = response.getStatusCode().value(); - System.out.printf("[%3d] %s - %s (%s)%n", statusCode, name, type, uri); - } - catch (URISyntaxException ex) { - throw new RuntimeException(ex); + String url = link.url(new LinkedVersion(version)); + int statusCode = restClient.head().uri(url).retrieve().toEntity(String.class).getStatusCode().value(); + if (statusCode != 200) { + int altStatusCode = restClient.head() + .uri(url + "/'") + .retrieve() + .toEntity(String.class) + .getStatusCode() + .value(); + if (altStatusCode == 200) { + statusCode = 200; + } } + System.out.printf("[%3d] %s - %s (%s)%n", statusCode, name, type, url); } } diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc index 4b87a7e1ea4..0f3037b62e2 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc @@ -357,7 +357,7 @@ If you're using Spring Data JDBC with xref:packaging/aot.adoc[ahead-of-time proc To prevent the need for a DB connection during AOT processing, define a `JdbcDialect` bean that's appropriate for your application's database. For example, if you're using Postgres, define a `JdbcPostgresDialect` bean. -TIP: For complete details of Spring Data JDBC, see the {url-spring-data-jdbc-docs}[reference documentation]. +TIP: For complete details of Spring Data JDBC, see the {url-spring-data-relational-docs}[reference documentation]. @@ -567,7 +567,7 @@ include-code::MyBean[] [[data.sql.r2dbc.repositories]] === Spring Data R2DBC Repositories -https://spring.io/projects/spring-data-r2dbc[Spring Data R2DBC] repositories are interfaces that you can define to access data. +https://spring.io/projects/spring-data-relational[Spring Data R2DBC] repositories are interfaces that you can define to access data. Queries are created automatically from your method names. For example, a `CityRepository` interface might declare a `findAllByState(String state)` method to find all the cities in a given state. @@ -580,4 +580,4 @@ The following example shows a typical Spring Data repository interface definitio include-code::CityRepository[] -TIP: We have barely scratched the surface of Spring Data R2DBC. For complete details, see the {url-spring-data-r2dbc-docs}[Spring Data R2DBC reference documentation]. +TIP: We have barely scratched the surface of Spring Data R2DBC. For complete details, see the {url-spring-data-relational-docs}[Spring Data R2DBC reference documentation]. diff --git a/platform/spring-boot-dependencies/build.gradle b/platform/spring-boot-dependencies/build.gradle index 6026011fef5..fc255789033 100644 --- a/platform/spring-boot-dependencies/build.gradle +++ b/platform/spring-boot-dependencies/build.gradle @@ -2722,15 +2722,6 @@ bom { .formatted(version.forAntora())) releaseNotes("https://github.com/spring-projects/spring-data-envers/releases/tag/{version}") } - module("spring-data-jdbc") { - site("https://spring.io/projects/spring-data-jdbc") - github("https://github.com/spring-projects/spring-data-jdbc") - javadoc(version -> "https://docs.spring.io/spring-data-jdbc/docs/%s/api" - .formatted(version.forMajorMinorGeneration()), "org.springframework.data.jdbc") - docs(version -> "https://docs.spring.io/spring-data-jdbc/reference/%s" - .formatted(version.forAntora())) - releaseNotes("https://github.com/spring-projects/spring-data-jdbc/releases/tag/{version}") - } module("spring-data-jpa") { site("https://spring.io/projects/spring-data-jpa") github("https://github.com/spring-projects/spring-data-jpa") @@ -2767,14 +2758,15 @@ bom { .formatted(version.forAntora())) releaseNotes("https://github.com/spring-projects/spring-data-neo4j/releases/tag/{version}") } - module("spring-data-r2dbc") { - site("https://spring.io/projects/spring-data-r2dbc") - github("https://github.com/spring-projects/spring-data-r2dbc") - javadoc(version -> "https://docs.spring.io/spring-data-r2dbc/docs/%s/api" - .formatted(version.forMajorMinorGeneration()), "org.springframework.data.r2dbc") - docs(version -> "https://docs.spring.io/spring-data-r2dbc/reference/%s" + module("spring-data-relational") { + site("https://spring.io/projects/spring-data-relational") + github("https://github.com/spring-projects/spring-data-relational") + javadoc(version -> "https://docs.spring.io/spring-data-relational/docs/%s/api" + .formatted(version.forMajorMinorGeneration()), + "org.springframework.data.jdbc", "org.springframework.data.r2dbc") + docs(version -> "https://docs.spring.io/spring-data-relational/reference/%s" .formatted(version.forAntora())) - releaseNotes("https://github.com/spring-projects/spring-data-r2dbc/releases/tag/{version}") + releaseNotes("https://github.com/spring-projects/spring-data-relational/releases/tag/{version}") } module("spring-data-redis") { site("https://spring.io/projects/spring-data-redis")