From 20d21a825114345cd94d185d8891c4e9feccd74b Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 23 Oct 2024 16:10:37 +0200 Subject: [PATCH] Rework links to Spring Boot in reference docs Closes gh-33776 --- framework-docs/antora.yml | 3 ++- framework-docs/modules/ROOT/pages/core/spring-jcl.adoc | 2 +- .../modules/ROOT/pages/integration/observability.adoc | 2 +- framework-docs/modules/ROOT/pages/languages/kotlin.adoc | 2 +- .../ROOT/pages/languages/kotlin/spring-projects-in.adoc | 4 ++-- .../pages/testing/mockmvc/hamcrest/vs-streaming-response.adoc | 2 +- .../testing/mockmvc/vs-end-to-end-integration-tests.adoc | 2 +- framework-docs/modules/ROOT/pages/web/webflux/config.adoc | 2 +- .../modules/ROOT/pages/web/webmvc/mvc-config/enable.adoc | 2 +- .../ROOT/pages/web/webmvc/mvc-config/message-converters.adoc | 2 +- framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet.adoc | 2 +- 11 files changed, 13 insertions(+), 12 deletions(-) diff --git a/framework-docs/antora.yml b/framework-docs/antora.yml index 87f10b428b..87f730b857 100644 --- a/framework-docs/antora.yml +++ b/framework-docs/antora.yml @@ -42,7 +42,8 @@ asciidoc: spring-framework-reference: '{spring-framework-docs-root}/{spring-version}/reference' # # Other Spring portfolio projects - spring-boot-docs: '{docs-site}/spring-boot/docs/current/reference/html' + spring-boot-docs: '{docs-site}/spring-boot' + spring-boot-docs-ref: '{spring-boot-docs}/reference' spring-boot-issues: '{spring-github-org}/spring-boot/issues' # TODO add more projects / links or just build up on {docs-site}? # TODO rename the below using new conventions diff --git a/framework-docs/modules/ROOT/pages/core/spring-jcl.adoc b/framework-docs/modules/ROOT/pages/core/spring-jcl.adoc index 59c5396e01..547b80ddd4 100644 --- a/framework-docs/modules/ROOT/pages/core/spring-jcl.adoc +++ b/framework-docs/modules/ROOT/pages/core/spring-jcl.adoc @@ -9,7 +9,7 @@ known as _JUL_ or `java.util.logging`) if neither Log4j 2.x nor SLF4J is availab Put Log4j 2.x or Logback (or another SLF4J provider) in your classpath, without any extra bridges, and let the framework auto-adapt to your choice. For further information see the -{spring-boot-docs}/features.html#features.logging[Spring +{spring-boot-docs-ref}/features/logging.html[Spring Boot Logging Reference Documentation]. [NOTE] diff --git a/framework-docs/modules/ROOT/pages/integration/observability.adoc b/framework-docs/modules/ROOT/pages/integration/observability.adoc index 28fe88fdbc..efbce84895 100644 --- a/framework-docs/modules/ROOT/pages/integration/observability.adoc +++ b/framework-docs/modules/ROOT/pages/integration/observability.adoc @@ -7,7 +7,7 @@ Metrics can help you to track error rates, usage patterns, performance, and more Traces provide a holistic view of an entire system, crossing application boundaries; you can zoom in on particular user requests and follow their entire completion across applications. Spring Framework instruments various parts of its own codebase to publish observations if an `ObservationRegistry` is configured. -You can learn more about {spring-boot-docs}/actuator.html#actuator.metrics[configuring the observability infrastructure in Spring Boot]. +You can learn more about {spring-boot-docs-ref}/actuator/observability.html[configuring the observability infrastructure in Spring Boot]. [[observability.list]] diff --git a/framework-docs/modules/ROOT/pages/languages/kotlin.adoc b/framework-docs/modules/ROOT/pages/languages/kotlin.adoc index d373497009..41fbd6bb4f 100644 --- a/framework-docs/modules/ROOT/pages/languages/kotlin.adoc +++ b/framework-docs/modules/ROOT/pages/languages/kotlin.adoc @@ -13,7 +13,7 @@ Most of the code samples of the reference documentation are provided in Kotlin in addition to Java. The easiest way to build a Spring application with Kotlin is to leverage Spring Boot and -its {spring-boot-docs}/boot-features-kotlin.html[dedicated Kotlin support]. +its {spring-boot-docs-ref}/features/kotlin.html[dedicated Kotlin support]. {spring-site-guides}/tutorials/spring-boot-kotlin/[This comprehensive tutorial] will teach you how to build Spring Boot applications with Kotlin using https://start.spring.io/#!language=kotlin&type=gradle-project[start.spring.io]. diff --git a/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc b/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc index 300c0089c8..64da5a0b63 100644 --- a/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc +++ b/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc @@ -186,7 +186,7 @@ Therefore, if you wish to use the `@Value` annotation in Kotlin, you need to esc character by writing pass:q[`@Value("\${property}")`]. NOTE: If you use Spring Boot, you should probably use -{spring-boot-docs}/boot-features-external-config.html#boot-features-external-config-typesafe-configuration-properties[`@ConfigurationProperties`] +{spring-boot-docs-ref}/features/external-config.html#features.external-config.typesafe-configuration-properties[`@ConfigurationProperties`] instead of `@Value` annotations. As an alternative, you can customize the property placeholder prefix by declaring the @@ -323,7 +323,7 @@ The recommended testing framework is https://junit.org/junit5/[JUnit 5] along wi https://mockk.io/[Mockk] for mocking. NOTE: If you are using Spring Boot, see -{spring-boot-docs}/features.html#features.kotlin.testing[this related documentation]. +{spring-boot-docs-ref}/features/kotlin.html#features.kotlin.testing[this related documentation]. [[constructor-injection]] diff --git a/framework-docs/modules/ROOT/pages/testing/mockmvc/hamcrest/vs-streaming-response.adoc b/framework-docs/modules/ROOT/pages/testing/mockmvc/hamcrest/vs-streaming-response.adoc index e7a5dba13f..18813c7c52 100644 --- a/framework-docs/modules/ROOT/pages/testing/mockmvc/hamcrest/vs-streaming-response.adoc +++ b/framework-docs/modules/ROOT/pages/testing/mockmvc/hamcrest/vs-streaming-response.adoc @@ -7,7 +7,7 @@ streams because there is no way to cancel the server stream from the client side To test infinite streams, you'll need to xref:testing/webtestclient.adoc#webtestclient-server-config[bind to] a running server, or when using Spring Boot, -{spring-boot-docs}/spring-boot-features.html#boot-features-testing-spring-boot-applications-testing-with-running-server[test with a running server]. +{spring-boot-docs-ref}/testing/spring-boot-applications.html#testing.spring-boot-applications.with-running-server[test with a running server]. `MockMvcWebTestClient` does support asynchronous responses, and even streaming responses. The limitation is that it can't influence the server to stop, and therefore the server diff --git a/framework-docs/modules/ROOT/pages/testing/mockmvc/vs-end-to-end-integration-tests.adoc b/framework-docs/modules/ROOT/pages/testing/mockmvc/vs-end-to-end-integration-tests.adoc index 46a8a8f345..4a4e2eee7a 100644 --- a/framework-docs/modules/ROOT/pages/testing/mockmvc/vs-end-to-end-integration-tests.adoc +++ b/framework-docs/modules/ROOT/pages/testing/mockmvc/vs-end-to-end-integration-tests.adoc @@ -21,7 +21,7 @@ for rendering JSON, XML, and other formats through `@ResponseBody` methods. Alternatively, you may consider the full end-to-end integration testing support from Spring Boot with `@SpringBootTest`. See the -{spring-boot-docs}/spring-boot-features.html#boot-features-testing[Spring Boot Reference Guide]. +{spring-boot-docs-ref}/testing/spring-boot-applications.html[Spring Boot Reference Guide]. There are pros and cons for each approach. The options provided in Spring MVC Test are different stops on the scale from classic unit testing to full integration testing. To be diff --git a/framework-docs/modules/ROOT/pages/web/webflux/config.adoc b/framework-docs/modules/ROOT/pages/web/webflux/config.adoc index d242342f8a..44873608f2 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux/config.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux/config.adoc @@ -47,7 +47,7 @@ Kotlin:: NOTE: When using Spring Boot, you may want to use `@Configuration` classes of type `WebFluxConfigurer` but without `@EnableWebFlux` to keep Spring Boot WebFlux customizations. See more details in xref:#webflux-config-customize[the WebFlux config API section] and in -{spring-boot-docs}/web.html#web.reactive.webflux.auto-configuration[the dedicated Spring Boot documentation]. +{spring-boot-docs-ref}/web/reactive.html#web.reactive.webflux.auto-configuration[the dedicated Spring Boot documentation]. The preceding example registers a number of Spring WebFlux xref:web/webflux/dispatcher-handler.adoc#webflux-special-bean-types[infrastructure beans] and adapts to dependencies diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/enable.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/enable.adoc index 87d2ab0a0a..b5beda90a0 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/enable.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/enable.adoc @@ -7,7 +7,7 @@ You can use the `@EnableWebMvc` annotation to enable MVC configuration with prog include-code::./WebConfiguration[tag=snippet,indent=0] -NOTE: When using Spring Boot, you may want to use `@Configuration` classes of type `WebMvcConfigurer` but without `@EnableWebMvc` to keep Spring Boot MVC customizations. See more details in xref:web/webmvc/mvc-config/customize.adoc[the MVC Config API section] and in {spring-boot-docs}/web.html#web.servlet.spring-mvc.auto-configuration[the dedicated Spring Boot documentation]. +NOTE: When using Spring Boot, you may want to use `@Configuration` classes of type `WebMvcConfigurer` but without `@EnableWebMvc` to keep Spring Boot MVC customizations. See more details in xref:web/webmvc/mvc-config/customize.adoc[the MVC Config API section] and in {spring-boot-docs-ref}/web/servlet.html#web.servlet.spring-mvc.auto-configuration[the dedicated Spring Boot documentation]. The preceding example registers a number of Spring MVC xref:web/webmvc/mvc-servlet/special-bean-types.adoc[infrastructure beans] and adapts to dependencies diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/message-converters.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/message-converters.adoc index ad09392ec7..bec903ec76 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/message-converters.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/message-converters.adoc @@ -11,7 +11,7 @@ You can also customize the list of configured message converters at the end by o TIP: In a Spring Boot application, the `WebMvcAutoConfiguration` adds any `HttpMessageConverter` beans it detects, in addition to default converters. Hence, in a -Boot application, prefer to use the {spring-boot-docs}/web.html#web.servlet.spring-mvc.message-converters[HttpMessageConverters] +Boot application, prefer to use the {spring-boot-docs-ref}/web/servlet.html#web.servlet.spring-mvc.message-converters[HttpMessageConverters] mechanism. Or alternatively, use `extendMessageConverters` to modify message converters at the end. diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet.adoc index 0d51c67b03..5205cec16d 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet.adoc @@ -111,7 +111,7 @@ the lifecycle of the Servlet container, Spring Boot uses Spring configuration to bootstrap itself and the embedded Servlet container. `Filter` and `Servlet` declarations are detected in Spring configuration and registered with the Servlet container. For more details, see the -{spring-boot-docs}/web.html#web.servlet.embedded-container[Spring Boot documentation]. +{spring-boot-docs-ref}/web/servlet.html#web.servlet.embedded-container[Spring Boot documentation].