mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix links to Antora based JavaDoc and reference documentation
This introduces two different attributes for, e.g. the Spring Framework version: the "normal" one, e.g. 6.1.0-SNAPSHOT, and the Antora one, e.g. 6.1. Spring Framework's reference documentation is still broken when using SNAPSHOT versions, see spring-framework/gh-31480. See gh-38000
This commit is contained in:
parent
7bd9989614
commit
4c3de96d74
@ -250,8 +250,12 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
|
||||
dependsOn dependencyVersions
|
||||
doFirst {
|
||||
def versionConstraints = dependencyVersions.versionConstraints
|
||||
def toAntoraVersion = version -> {
|
||||
String formatted = version.split("\\.").take(2).join('.')
|
||||
return version.endsWith("-SNAPSHOT") ? formatted + "-SNAPSHOT" : formatted
|
||||
}
|
||||
def integrationVersion = versionConstraints["org.springframework.integration:spring-integration-core"]
|
||||
def integrationDocs = String.format("https://docs.spring.io/spring-integration/docs/%s/reference/html/", integrationVersion)
|
||||
String integrationDocs = String.format("https://docs.spring.io/spring-integration/reference/%s", toAntoraVersion(integrationVersion))
|
||||
attributes "spring-integration-docs": integrationDocs
|
||||
}
|
||||
dependsOn documentationTest
|
||||
|
@ -19,7 +19,7 @@ include::{snippets}/integrationgraph/graph/http-response.adoc[]
|
||||
[[integrationgraph.retrieving.response-structure]]
|
||||
=== Response Structure
|
||||
The response contains all Spring Integration components used within the application, as well as the links between them.
|
||||
More information about the structure can be found in the {spring-integration-docs}index-single.html#integration-graph[reference documentation].
|
||||
More information about the structure can be found in the {spring-integration-docs}/index.html#integration-graph[reference documentation].
|
||||
|
||||
|
||||
|
||||
|
@ -318,7 +318,7 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
|
||||
doFirst {
|
||||
def versionConstraints = dependencyVersions.versionConstraints
|
||||
def toAntoraVersion = version -> {
|
||||
def formatted = version.split("\\.").take(2).join('.')
|
||||
String formatted = version.split("\\.").take(2).join('.')
|
||||
return version.endsWith("-SNAPSHOT") ? formatted + "-SNAPSHOT" : formatted
|
||||
}
|
||||
attributes "hibernate-version": versionConstraints["org.hibernate.orm:hibernate-core"].split("\\.").take(2).join('.'),
|
||||
@ -327,7 +327,8 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
|
||||
"lettuce-version": versionConstraints["io.lettuce:lettuce-core"],
|
||||
"native-build-tools-version": nativeBuildToolsVersion,
|
||||
"spring-amqp-version": versionConstraints["org.springframework.amqp:spring-amqp"],
|
||||
"spring-batch-version": toAntoraVersion(versionConstraints["org.springframework.batch:spring-batch-core"]),
|
||||
"spring-batch-version": versionConstraints["org.springframework.batch:spring-batch-core"],
|
||||
"spring-batch-version-antora": toAntoraVersion(versionConstraints["org.springframework.batch:spring-batch-core"]),
|
||||
"spring-boot-version": project.version,
|
||||
"spring-data-commons-version": versionConstraints["org.springframework.data:spring-data-commons"],
|
||||
"spring-data-couchbase-version": versionConstraints["org.springframework.data:spring-data-couchbase"],
|
||||
@ -338,13 +339,14 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
|
||||
"spring-data-neo4j-version": versionConstraints["org.springframework.data:spring-data-neo4j"],
|
||||
"spring-data-r2dbc-version": versionConstraints["org.springframework.data:spring-data-r2dbc"],
|
||||
"spring-data-rest-version": versionConstraints["org.springframework.data:spring-data-rest-core"],
|
||||
"spring-framework-version": toAntoraVersion(versionConstraints["org.springframework:spring-core"]),
|
||||
"spring-graphql-version": toAntoraVersion(versionConstraints["org.springframework.graphql:spring-graphql"]),
|
||||
"spring-integration-version": toAntoraVersion(versionConstraints["org.springframework.integration:spring-integration-core"]),
|
||||
"spring-framework-version": versionConstraints["org.springframework:spring-core"],
|
||||
"spring-framework-version-antora": toAntoraVersion(versionConstraints["org.springframework:spring-core"]),
|
||||
"spring-graphql-version-antora": toAntoraVersion(versionConstraints["org.springframework.graphql:spring-graphql"]),
|
||||
"spring-integration-version-antora": toAntoraVersion(versionConstraints["org.springframework.integration:spring-integration-core"]),
|
||||
"spring-kafka-version": versionConstraints["org.springframework.kafka:spring-kafka"],
|
||||
"spring-pulsar-version": versionConstraints["org.springframework.pulsar:spring-pulsar"],
|
||||
"spring-security-version": toAntoraVersion(versionConstraints["org.springframework.security:spring-security-core"]),
|
||||
"spring-authorization-server-version": toAntoraVersion(versionConstraints["org.springframework.security:spring-security-oauth2-authorization-server"]),
|
||||
"spring-security-version-antora": toAntoraVersion(versionConstraints["org.springframework.security:spring-security-core"]),
|
||||
"spring-authorization-server-version-antora": toAntoraVersion(versionConstraints["org.springframework.security:spring-security-oauth2-authorization-server"]),
|
||||
"spring-webservices-version": versionConstraints["org.springframework.ws:spring-ws-core"],
|
||||
"tomcat-version": tomcatVersion.split("\\.").take(2).join('.'),
|
||||
"remote-spring-application-output": runRemoteSpringApplicationExample.outputs.files.singleFile,
|
||||
|
@ -871,7 +871,7 @@ A `CacheMetricsRegistrar` bean is made available to make that process easier.
|
||||
[[actuator.metrics.supported.spring-batch]]
|
||||
==== Spring Batch Metrics
|
||||
|
||||
See the {spring-batch-docs}monitoring-and-metrics.html[Spring Batch reference documentation].
|
||||
See the {spring-batch-docs}/monitoring-and-metrics.html[Spring Batch reference documentation].
|
||||
|
||||
|
||||
|
||||
@ -959,7 +959,7 @@ Auto-configuration enables the instrumentation of all available RabbitMQ connect
|
||||
|
||||
[[actuator.metrics.supported.spring-integration]]
|
||||
==== Spring Integration Metrics
|
||||
Spring Integration automatically provides {spring-integration-docs}metrics.html#micrometer-integration[Micrometer support] whenever a `MeterRegistry` bean is available.
|
||||
Spring Integration automatically provides {spring-integration-docs}/metrics.html#micrometer-integration[Micrometer support] whenever a `MeterRegistry` bean is available.
|
||||
Metrics are published under the `spring.integration.` meter name.
|
||||
|
||||
|
||||
|
@ -55,8 +55,8 @@
|
||||
:spring-boot-test-autoconfigure-module-api: {spring-boot-api}/org/springframework/boot/test/autoconfigure
|
||||
:spring-amqp-api: https://docs.spring.io/spring-amqp/docs/{spring-amqp-version}/api/org/springframework/amqp
|
||||
:spring-batch: https://spring.io/projects/spring-batch
|
||||
:spring-batch-api: https://docs.spring.io/spring-batch/docs/{spring-batch-version}/api/org/springframework/batch
|
||||
:spring-batch-docs: https://docs.spring.io/spring-batch/reference/{spring-batch-version}/
|
||||
:spring-batch-api: https://docs.spring.io/spring-batch/docs/{spring-batch-version}/org/springframework/batch
|
||||
:spring-batch-docs: https://docs.spring.io/spring-batch/reference/{spring-batch-version-antora}
|
||||
:spring-data: https://spring.io/projects/spring-data
|
||||
:spring-data-cassandra: https://spring.io/projects/spring-data-cassandra
|
||||
:spring-data-commons-api: https://docs.spring.io/spring-data/commons/docs/{spring-data-commons-version}/api/org/springframework/data
|
||||
@ -83,19 +83,18 @@
|
||||
:spring-data-rest-api: https://docs.spring.io/spring-data/rest/docs/{spring-data-rest-version}/api/org/springframework/data/rest
|
||||
:spring-framework: https://spring.io/projects/spring-framework
|
||||
:spring-framework-api: https://docs.spring.io/spring-framework/docs/{spring-framework-version}/javadoc-api/org/springframework
|
||||
:spring-framework-docs: https://docs.spring.io/spring-framework/reference/{spring-framework-version}
|
||||
:spring-framework-docs: https://docs.spring.io/spring-framework/reference/{spring-framework-version-antora}
|
||||
:spring-graphql: https://spring.io/projects/spring-graphql
|
||||
:spring-graphql-api: https://docs.spring.io/spring-graphql/docs/{spring-graphql-version}/api/
|
||||
:spring-graphql-docs: https://docs.spring.io/spring-graphql/reference/{spring-graphql-version}/
|
||||
:spring-graphql-docs: https://docs.spring.io/spring-graphql/reference/{spring-graphql-version-antora}
|
||||
:spring-integration: https://spring.io/projects/spring-integration
|
||||
:spring-integration-docs: https://docs.spring.io/spring-integration/reference/{spring-integration-version}/
|
||||
:spring-integration-docs: https://docs.spring.io/spring-integration/reference/{spring-integration-version-antora}
|
||||
:spring-kafka-docs: https://docs.spring.io/spring-kafka/docs/{spring-kafka-version}/reference/
|
||||
:spring-pulsar-docs: https://docs.spring.io/spring-pulsar/docs/{spring-pulsar-version}/reference/
|
||||
:spring-restdocs: https://spring.io/projects/spring-restdocs
|
||||
:spring-security: https://spring.io/projects/spring-security
|
||||
:spring-security-docs: https://docs.spring.io/spring-security/reference/{spring-security-version}
|
||||
:spring-security-docs: https://docs.spring.io/spring-security/reference/{spring-security-version-antora}
|
||||
:spring-authorization-server: https://spring.io/projects/spring-authorization-server
|
||||
:spring-authorization-server-docs: https://docs.spring.io/spring-authorization-server/reference/{spring-authorization-server-version}/
|
||||
:spring-authorization-server-docs: https://docs.spring.io/spring-authorization-server/reference/{spring-authorization-server-version-antora}
|
||||
:spring-session: https://spring.io/projects/spring-session
|
||||
:spring-webservices-docs: https://docs.spring.io/spring-ws/docs/{spring-webservices-version}/reference/html/
|
||||
:ant-docs: https://ant.apache.org/manual
|
||||
|
@ -475,7 +475,7 @@ There are `GraphQlTester` variants and Spring Boot will auto-configure them depe
|
||||
* the `ExecutionGraphQlServiceTester` performs tests on the server side, without a client nor a transport
|
||||
* the `HttpGraphQlTester` performs tests with a client that connects to a server, with or without a live server
|
||||
|
||||
Spring Boot helps you to test your {spring-graphql-docs}#controllers[Spring GraphQL Controllers] with the `@GraphQlTest` annotation.
|
||||
Spring Boot helps you to test your {spring-graphql-docs}/#controllers[Spring GraphQL Controllers] with the `@GraphQlTest` annotation.
|
||||
`@GraphQlTest` auto-configures the Spring GraphQL infrastructure, without any transport nor server being involved.
|
||||
This limits scanned beans to `@Controller`, `RuntimeWiringConfigurer`, `JsonComponent`, `Converter`, `GenericConverter`, `DataFetcherExceptionResolver`, `Instrumentation` and `GraphQlSourceBuilderCustomizer`.
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@GraphQlTest` annotation is used.
|
||||
|
@ -59,4 +59,4 @@ This provides only one argument to the batch job: `someParameter=someValue`.
|
||||
=== Storing the Job Repository
|
||||
Spring Batch requires a data store for the `Job` repository.
|
||||
If you use Spring Boot, you must use an actual database.
|
||||
Note that it can be an in-memory database, see {spring-batch-docs}job.html#configuringJobRepository[Configuring a Job Repository].
|
||||
Note that it can be an in-memory database, see {spring-batch-docs}/job.html#configuringJobRepository[Configuring a Job Repository].
|
||||
|
@ -54,9 +54,9 @@ If you wish to not expose information about the schema, you can disable introspe
|
||||
=== GraphQL RuntimeWiring
|
||||
The GraphQL Java `RuntimeWiring.Builder` can be used to register custom scalar types, directives, type resolvers, `DataFetcher`, and more.
|
||||
You can declare `RuntimeWiringConfigurer` beans in your Spring config to get access to the `RuntimeWiring.Builder`.
|
||||
Spring Boot detects such beans and adds them to the {spring-graphql-docs}#execution-graphqlsource[GraphQlSource builder].
|
||||
Spring Boot detects such beans and adds them to the {spring-graphql-docs}/#execution-graphqlsource[GraphQlSource builder].
|
||||
|
||||
Typically, however, applications will not implement `DataFetcher` directly and will instead create {spring-graphql-docs}#controllers[annotated controllers].
|
||||
Typically, however, applications will not implement `DataFetcher` directly and will instead create {spring-graphql-docs}/#controllers[annotated controllers].
|
||||
Spring Boot will automatically detect `@Controller` classes with annotated handler methods and register those as ``DataFetcher``s.
|
||||
Here's a sample implementation for our greeting query with a `@Controller` class:
|
||||
|
||||
@ -67,7 +67,7 @@ include::code:GreetingController[]
|
||||
[[web.graphql.data-query]]
|
||||
=== Querydsl and QueryByExample Repositories Support
|
||||
Spring Data offers support for both Querydsl and QueryByExample repositories.
|
||||
Spring GraphQL can {spring-graphql-docs}#data[configure Querydsl and QueryByExample repositories as `DataFetcher`].
|
||||
Spring GraphQL can {spring-graphql-docs}/#data[configure Querydsl and QueryByExample repositories as `DataFetcher`].
|
||||
|
||||
Spring Data repositories annotated with `@GraphQlRepository` and extending one of:
|
||||
|
||||
@ -98,7 +98,7 @@ The GraphQL WebSocket endpoint is off by default. To enable it:
|
||||
* For a WebFlux application, no additional dependency is required
|
||||
* For both, the configprop:spring.graphql.websocket.path[] application property must be set
|
||||
|
||||
Spring GraphQL provides a {spring-graphql-docs}#web-interception[Web Interception] model.
|
||||
Spring GraphQL provides a {spring-graphql-docs}/#web-interception[Web Interception] model.
|
||||
This is quite useful for retrieving information from an HTTP request header and set it in the GraphQL context or fetching information from the same context and writing it to a response header.
|
||||
With Spring Boot, you can declare a `WebInterceptor` bean to have it registered with the web transport.
|
||||
|
||||
@ -138,7 +138,7 @@ include::code:RSocketGraphQlClientExample[tag=request]
|
||||
[[web.graphql.exception-handling]]
|
||||
=== Exception Handling
|
||||
Spring GraphQL enables applications to register one or more Spring `DataFetcherExceptionResolver` components that are invoked sequentially.
|
||||
The Exception must be resolved to a list of `graphql.GraphQLError` objects, see {spring-graphql-docs}#execution-exceptions[Spring GraphQL exception handling documentation].
|
||||
The Exception must be resolved to a list of `graphql.GraphQLError` objects, see {spring-graphql-docs}/#execution-exceptions[Spring GraphQL exception handling documentation].
|
||||
Spring Boot will automatically detect `DataFetcherExceptionResolver` beans and register them with the `GraphQlSource.Builder`.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user