From 9ceb75b228f5ce4c47145afbbdac132ac5e8949e Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Wed, 19 Apr 2023 10:23:59 -0500 Subject: [PATCH] Insert explicit ids for headers --- .../modules/ROOT/pages/core/appendix.adoc | 2 +- .../modules/ROOT/pages/core/null-safety.adoc | 2 ++ framework-docs/modules/ROOT/pages/index.adoc | 1 + .../modules/ROOT/pages/integration/cache.adoc | 1 + .../ROOT/pages/integration/scheduling.adoc | 1 + .../modules/ROOT/pages/languages/kotlin.adoc | 24 +++++++++++++++++++ .../modules/ROOT/pages/page-layout.adoc | 2 +- .../pages/testing/testcontext-framework.adoc | 9 +++++++ .../modules/ROOT/pages/web/web-uris.adoc | 3 +++ .../ROOT/pages/web/webflux-functional.adoc | 1 + .../ROOT/pages/web/webflux-webclient.adoc | 1 + .../modules/ROOT/pages/web/webflux.adoc | 6 +++++ .../ROOT/pages/web/webmvc-functional.adoc | 1 + .../modules/ROOT/pages/web/webmvc.adoc | 1 + .../ROOT/pages/web/websocket-intro.adoc | 3 +++ .../modules/ROOT/pages/web/websocket.adoc | 2 ++ 16 files changed, 58 insertions(+), 2 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/appendix.adoc b/framework-docs/modules/ROOT/pages/core/appendix.adoc index 0477c35aad..094ec6a11e 100644 --- a/framework-docs/modules/ROOT/pages/core/appendix.adoc +++ b/framework-docs/modules/ROOT/pages/core/appendix.adoc @@ -1667,4 +1667,4 @@ its behavior changes. | `spring.context.refresh` | Application context refresh phase. | -|=== \ No newline at end of file +|=== diff --git a/framework-docs/modules/ROOT/pages/core/null-safety.adoc b/framework-docs/modules/ROOT/pages/core/null-safety.adoc index ffed936d84..2e649691ab 100644 --- a/framework-docs/modules/ROOT/pages/core/null-safety.adoc +++ b/framework-docs/modules/ROOT/pages/core/null-safety.adoc @@ -30,6 +30,7 @@ Spring application developers. +[[use-cases]] == Use cases In addition to providing an explicit declaration for Spring Framework API nullability, @@ -43,6 +44,7 @@ are available in the <>, @@ -942,6 +960,7 @@ class OrderServiceIntegrationTests(val orderService: OrderService, ==== +[[per_class-lifecycle]] ==== `PER_CLASS` Lifecycle Kotlin lets you specify meaningful test function names between backticks (```). @@ -986,6 +1005,7 @@ class IntegrationTests { ---- +[[specification-like-tests]] ==== Specification-like Tests You can create specification-like tests with JUnit 5 and Kotlin. @@ -1036,6 +1056,7 @@ https://spring.io/guides/tutorials/spring-boot-kotlin/[the dedicated tutorial]. +[[start-spring-io]] === `start.spring.io` The easiest way to start a new Spring Framework project in Kotlin is to create a new Spring @@ -1043,6 +1064,7 @@ Boot 2 project on https://start.spring.io/#!language=kotlin&type=gradle-project[ +[[choosing-the-web-flavor]] === Choosing the Web Flavor Spring Framework now comes with two different web stacks: <> and @@ -1073,6 +1095,7 @@ Kotlin and the Spring Framework: +[[examples]] === Examples The following Github projects offer examples that you can learn from and possibly even extend: @@ -1087,6 +1110,7 @@ The following Github projects offer examples that you can learn from and possibl +[[issues]] === Issues The following list categorizes the pending issues related to Spring and Kotlin support: diff --git a/framework-docs/modules/ROOT/pages/page-layout.adoc b/framework-docs/modules/ROOT/pages/page-layout.adoc index d7209280b2..4ed56e0855 100644 --- a/framework-docs/modules/ROOT/pages/page-layout.adoc +++ b/framework-docs/modules/ROOT/pages/page-layout.adoc @@ -1,4 +1,4 @@ :toc: left :toclevels: 4 :tabsize: 4 -:docinfo1: \ No newline at end of file +:docinfo1: diff --git a/framework-docs/modules/ROOT/pages/testing/testcontext-framework.adoc b/framework-docs/modules/ROOT/pages/testing/testcontext-framework.adoc index 0fabda612d..b1d41eda4f 100644 --- a/framework-docs/modules/ROOT/pages/testing/testcontext-framework.adoc +++ b/framework-docs/modules/ROOT/pages/testing/testcontext-framework.adoc @@ -38,6 +38,7 @@ test execution by providing dependency injection, managing transactions, and so class. See the {api-spring-framework}/test/context/package-summary.html[javadoc] and the Spring test suite for further information and examples of various implementations. +[[testcontext]] === `TestContext` `TestContext` encapsulates the context in which a test is run (agnostic of the @@ -45,6 +46,7 @@ actual testing framework in use) and provides context management and caching sup the test instance for which it is responsible. The `TestContext` also delegates to a `SmartContextLoader` to load an `ApplicationContext` if requested. +[[testcontextmanager]] === `TestContextManager` `TestContextManager` is the main entry point into the Spring TestContext Framework and is @@ -59,11 +61,13 @@ responsible for managing a single `TestContext` and signaling events to each reg * After any "`after`" or "`after each`" methods of a particular testing framework. * After any "`after class`" or "`after all`" methods of a particular testing framework. +[[testexecutionlistener]] === `TestExecutionListener` `TestExecutionListener` defines the API for reacting to test-execution events published by the `TestContextManager` with which the listener is registered. See <>. +[[context-loaders]] === Context Loaders `ContextLoader` is a strategy interface for loading an `ApplicationContext` for an @@ -1732,6 +1736,7 @@ through the `getPropertySourceLocations()` and `getPropertySourceProperties()` m `MergedContextConfiguration`. ==== +[[declaring-test-property-sources]] ==== Declaring Test Property Sources You can configure test properties files by using the `locations` or `value` attribute of @@ -1829,6 +1834,7 @@ meta-annotation. ==== +[[default-properties-file-detection]] ==== Default Properties File Detection If `@TestPropertySource` is declared as an empty annotation (that is, without explicit @@ -1838,6 +1844,7 @@ if the annotated test class is `com.example.MyTest`, the corresponding default p file is `classpath:com/example/MyTest.properties`. If the default cannot be detected, an `IllegalStateException` is thrown. +[[precedence]] ==== Precedence Test properties have higher precedence than those defined in the operating system's @@ -1881,6 +1888,7 @@ to specify properties both in a file and inline: } ---- +[[inheriting-and-overriding-test-property-sources]] ==== Inheriting and Overriding Test Property Sources `@TestPropertySource` supports boolean `inheritLocations` and `inheritProperties` @@ -2062,6 +2070,7 @@ properties. } ---- +[[precedence]] ==== Precedence Dynamic properties have higher precedence than those loaded from `@TestPropertySource`, diff --git a/framework-docs/modules/ROOT/pages/web/web-uris.adoc b/framework-docs/modules/ROOT/pages/web/web-uris.adoc index 26027a1a8d..05b427a99a 100644 --- a/framework-docs/modules/ROOT/pages/web/web-uris.adoc +++ b/framework-docs/modules/ROOT/pages/web/web-uris.adoc @@ -1,4 +1,5 @@ [id={chapter}.web-uricomponents] +[[uricomponents]] = UriComponents [.small]#Spring MVC and Spring WebFlux# @@ -102,6 +103,7 @@ You can shorten it further still with a full URI template, as the following exam [id={chapter}.web-uribuilder] +[[uribuilder]] = UriBuilder [.small]#Spring MVC and Spring WebFlux# @@ -194,6 +196,7 @@ that holds configuration and preferences, as the following example shows: [id={chapter}.web-uri-encoding] +[[uri-encoding]] = URI Encoding [.small]#Spring MVC and Spring WebFlux# diff --git a/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc b/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc index 4ebf6b4294..882c68200d 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc @@ -619,6 +619,7 @@ RouterFunction route = route() <4> `otherRoute` is a router function that is created elsewhere, and added to the route built. +[[nested-routes]] === Nested Routes It is common for a group of router functions to have a shared predicate, for instance a diff --git a/framework-docs/modules/ROOT/pages/web/webflux-webclient.adoc b/framework-docs/modules/ROOT/pages/web/webflux-webclient.adoc index 34337a18a1..6116d9273b 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux-webclient.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux-webclient.adoc @@ -869,6 +869,7 @@ inline-style, through the built-in `BodyInserters`, as the following example sho .awaitBody() ---- +[[partevent]] ==== `PartEvent` To stream multipart data sequentially, you can provide multipart content through `PartEvent` diff --git a/framework-docs/modules/ROOT/pages/web/webflux.adoc b/framework-docs/modules/ROOT/pages/web/webflux.adoc index 1bc6f9dabc..8f771502e3 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux.adoc @@ -1,5 +1,6 @@ [[webflux]] :chapter: webflux +[[spring-webflux]] = Spring WebFlux The original web framework included in the Spring Framework, Spring Web MVC, was @@ -248,6 +249,7 @@ current thread (and rely on callbacks instead) means that you do not need extra there are no blocking calls to absorb. +[[invoking-a-blocking-api]] ==== Invoking a Blocking API What if you do need to use a blocking library? Both Reactor and RxJava provide the @@ -255,6 +257,7 @@ What if you do need to use a blocking library? Both Reactor and RxJava provide t easy escape hatch. Keep in mind, however, that blocking APIs are not a good fit for this concurrency model. +[[mutable-state]] ==== Mutable State In Reactor and RxJava, you declare logic through operators. At runtime, a reactive @@ -262,6 +265,7 @@ pipeline is formed where data is processed sequentially, in distinct stages. A k of this is that it frees applications from having to protect mutable state because application code within that pipeline is never invoked concurrently. +[[threading-model]] ==== Threading Model What threads should you expect to see on a server running with Spring WebFlux? @@ -287,6 +291,7 @@ specific thread pool `Scheduler` strategy. * Data access libraries and other third party dependencies can also create and use threads of their own. +[[configuring]] ==== Configuring The Spring Framework does not provide support for starting and stopping @@ -2841,6 +2846,7 @@ as the following example shows: <1> Using `@RequestBody`. -- +[[partevent]] ===== `PartEvent` To access multipart data sequentially, in a streaming fashion, you can use `@RequestBody` with diff --git a/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc b/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc index 07178eaecf..2dc31aa9b7 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc @@ -599,6 +599,7 @@ The following example shows the composition of four routes: <4> `otherRoute` is a router function that is created elsewhere, and added to the route built. +[[nested-routes]] === Nested Routes It is common for a group of router functions to have a shared predicate, for instance a shared diff --git a/framework-docs/modules/ROOT/pages/web/webmvc.adoc b/framework-docs/modules/ROOT/pages/web/webmvc.adoc index 2e10ae6abb..9f732da708 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc.adoc @@ -1,5 +1,6 @@ [[mvc]] :chapter: mvc +[[spring-web-mvc]] = Spring Web MVC Spring Web MVC is the original web framework built on the Servlet API and has been included diff --git a/framework-docs/modules/ROOT/pages/web/websocket-intro.adoc b/framework-docs/modules/ROOT/pages/web/websocket-intro.adoc index 0c2b096858..0b06b00b72 100644 --- a/framework-docs/modules/ROOT/pages/web/websocket-intro.adoc +++ b/framework-docs/modules/ROOT/pages/web/websocket-intro.adoc @@ -1,4 +1,5 @@ [id={chapter}.websocket-intro] +[[introduction-to-websocket]] = Introduction to WebSocket The WebSocket protocol, https://tools.ietf.org/html/rfc6455[RFC 6455], provides a standardized @@ -55,6 +56,7 @@ instructions of the cloud provider related to WebSocket support. [id={chapter}.websocket-intro-architecture] +[[http-versus-websocket]] == HTTP Versus WebSocket Even though WebSocket is designed to be HTTP-compatible and starts with an HTTP request, @@ -81,6 +83,7 @@ In the absence of that, they need to come up with their own conventions. [id={chapter}.websocket-intro-when-to-use] +[[when-to-use-websockets]] == When to Use WebSockets WebSockets can make a web page be dynamic and interactive. However, in many cases, diff --git a/framework-docs/modules/ROOT/pages/web/websocket.adoc b/framework-docs/modules/ROOT/pages/web/websocket.adoc index 48832aa3f3..94196410da 100644 --- a/framework-docs/modules/ROOT/pages/web/websocket.adoc +++ b/framework-docs/modules/ROOT/pages/web/websocket.adoc @@ -1226,6 +1226,7 @@ referenced through `@DestinationVariable` method arguments. Applications can als a dot-separated destination convention for mappings, as explained in <>. +[[supported-method-arguments]] ===== Supported Method Arguments The following table describes the method arguments: @@ -1270,6 +1271,7 @@ Values are converted to the declared method argument type as necessary. |=== +[[return-values]] ===== Return Values By default, the return value from a `@MessageMapping` method is serialized to a payload