diff --git a/src/docs/asciidoc/index.adoc b/src/docs/asciidoc/index.adoc index cb2901e8ce4..1a305273ecf 100644 --- a/src/docs/asciidoc/index.adoc +++ b/src/docs/asciidoc/index.adoc @@ -1,6 +1,9 @@ = Spring Framework Documentation :doc-root: https://docs.spring.io +:github-repo: spring-projects/spring-framework + :api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework +:spring-framework-main-code: https://github.com/{github-repo}/tree/main **** _What's New_, _Upgrade Notes_, _Supported Versions_, and other topics, diff --git a/src/docs/asciidoc/overview.adoc b/src/docs/asciidoc/overview.adoc index 1b41c6f2e6e..ba74cd35647 100644 --- a/src/docs/asciidoc/overview.adoc +++ b/src/docs/asciidoc/overview.adoc @@ -135,8 +135,7 @@ https://github.com/spring-projects/spring-framework[Github]. However, please kee that, for all but the most trivial issues, we expect a ticket to be filed in the issue tracker, where discussions take place and leave a record for future reference. -For more details see the guidelines at the -https://github.com/spring-projects/spring-framework/blob/master/CONTRIBUTING.md[CONTRIBUTING], +For more details see the guidelines at the {spring-framework-main-code}/CONTRIBUTING.md[CONTRIBUTING], top-level project page. diff --git a/src/docs/asciidoc/testing.adoc b/src/docs/asciidoc/testing.adoc index b497edbe3aa..4516ace078b 100644 --- a/src/docs/asciidoc/testing.adoc +++ b/src/docs/asciidoc/testing.adoc @@ -7573,9 +7573,9 @@ of testing even within the same project. ===== Further Examples The framework's own tests include -https://github.com/spring-projects/spring-framework/tree/master/spring-test/src/test/java/org/springframework/test/web/servlet/samples[ +{spring-framework-main-code}/spring-test/src/test/java/org/springframework/test/web/servlet/samples[ many sample tests] intended to show how to use MockMvc on its own or through the -https://github.com/spring-projects/spring-framework/tree/master/spring-test/src/test/java/org/springframework/test/web/servlet/samples/client[ +{spring-framework-main-code}/spring-test/src/test/java/org/springframework/test/web/servlet/samples/client[ WebTestClient]. Browse these examples for further ideas. @@ -8784,7 +8784,7 @@ configuration. Check for the support for code completion on static members. ==== Further Examples of Client-side REST Tests Spring MVC Test's own tests include -https://github.com/spring-projects/spring-framework/tree/master/spring-test/src/test/java/org/springframework/test/web/client/samples[example +{spring-framework-main-code}/spring-test/src/test/java/org/springframework/test/web/client/samples[example tests] of client-side REST tests. diff --git a/src/docs/asciidoc/web/webflux-view.adoc b/src/docs/asciidoc/web/webflux-view.adoc index 0321f1fd1df..51a7a150087 100644 --- a/src/docs/asciidoc/web/webflux-view.adoc +++ b/src/docs/asciidoc/web/webflux-view.adoc @@ -380,8 +380,8 @@ The following example shows how compile a template: ---- Check out the Spring Framework unit tests, -https://github.com/spring-projects/spring-framework/tree/master/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script[Java], and -https://github.com/spring-projects/spring-framework/tree/master/spring-webflux/src/test/resources/org/springframework/web/reactive/result/view/script[resources], +{spring-framework-main-code}/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script[Java], and +{spring-framework-main-code}/spring-webflux/src/test/resources/org/springframework/web/reactive/result/view/script[resources], for more configuration examples. diff --git a/src/docs/asciidoc/web/webflux-webclient.adoc b/src/docs/asciidoc/web/webflux-webclient.adoc index 2f56de4e371..22e0d265136 100644 --- a/src/docs/asciidoc/web/webflux-webclient.adoc +++ b/src/docs/asciidoc/web/webflux-webclient.adoc @@ -1130,7 +1130,7 @@ controller method . To test code that uses the `WebClient`, you can use a mock web server, such as the https://github.com/square/okhttp#mockwebserver[OkHttp MockWebServer]. To see an example of its use, check out -https://github.com/spring-projects/spring-framework/blob/master/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java[`WebClientIntegrationTests`] +{spring-framework-main-code}/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java[`WebClientIntegrationTests`] in the Spring Framework test suite or the https://github.com/square/okhttp/tree/master/samples/static-server[`static-server`] sample in the OkHttp repository. diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index dbe8a71d271..e6bf56cfa88 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -9,11 +9,10 @@ https://www.reactive-streams.org/[Reactive Streams] back pressure, and runs on s Netty, Undertow, and Servlet 3.1+ containers. Both web frameworks mirror the names of their source modules -(https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc[spring-webmvc] and -https://github.com/spring-projects/spring-framework/tree/master/spring-webflux[spring-webflux]) -and co-exist side by side in the Spring Framework. Each module is optional. -Applications can use one or the other module or, in some cases, both -- -for example, Spring MVC controllers with the reactive `WebClient`. +({spring-framework-main-code}/spring-webmvc[spring-webmvc] and +{spring-framework-main-code}/spring-webflux[spring-webflux]) and co-exist side by side in the +Spring Framework. Each module is optional. Applications can use one or the other module or, +in some cases, both -- for example, Spring MVC controllers with the reactive `WebClient`. diff --git a/src/docs/asciidoc/web/webmvc-view.adoc b/src/docs/asciidoc/web/webmvc-view.adoc index bcfcee6933d..fdca1d02bca 100644 --- a/src/docs/asciidoc/web/webmvc-view.adoc +++ b/src/docs/asciidoc/web/webmvc-view.adoc @@ -822,8 +822,8 @@ template engine configuration, for example). The following example shows how to ---- Check out the Spring Framework unit tests, -https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script[Java], and -https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc/src/test/resources/org/springframework/web/servlet/view/script[resources], +{spring-framework-main-code}/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script[Java], and +{spring-framework-main-code}/spring-webmvc/src/test/resources/org/springframework/web/servlet/view/script[resources], for more configuration examples. diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index 27b825c43d0..9ad7377fc38 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -5,12 +5,12 @@ Spring Web MVC is the original web framework built on the Servlet API and has been included in the Spring Framework from the very beginning. The formal name, "`Spring Web MVC,`" comes from the name of its source module -(https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc[`spring-webmvc`]), +({spring-framework-main-code}/spring-webmvc[`spring-webmvc`]), but it is more commonly known as "`Spring MVC`". Parallel to Spring Web MVC, Spring Framework 5.0 introduced a reactive-stack web framework whose name, "`Spring WebFlux,`" is also based on its source module -(https://github.com/spring-projects/spring-framework/tree/master/spring-webflux[`spring-webflux`]). +({spring-framework-main-code}/spring-webflux[`spring-webflux`]). This section covers Spring Web MVC. The <> covers Spring WebFlux. @@ -301,7 +301,7 @@ Applications can declare the infrastructure beans listed in <> is the best starting point. It declares the required beans in either Java or XML and provides a higher-level configuration callback API to