mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Merge branch '4.1.x'
Closes gh-51797
This commit is contained in:
@@ -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<String> 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);
|
||||
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;
|
||||
}
|
||||
catch (URISyntaxException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
System.out.printf("[%3d] %s - %s (%s)%n", statusCode, name, type, url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -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].
|
||||
|
||||
@@ -2738,15 +2738,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")
|
||||
@@ -2783,14 +2774,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")
|
||||
|
||||
Reference in New Issue
Block a user