Fix Asciidoctor Warnings
- Fix "possible invalid reference" errors
- Add <filename>.adoc where necessary
- Remove invalid link to beans-servicelocator This section no longer exists
- Fix "skipping reference to missing attribute" errors
- Add pass macro to escape literals interpreted as attributes
- Add missing :api-spring-framework: attribute
- Remove invalid {JB} attribute
Closes gh-24427
This commit is contained in:
@@ -3956,7 +3956,7 @@ for AspectJ LTW:
|
||||
* `spring-aop.jar`
|
||||
* `aspectjweaver.jar`
|
||||
|
||||
If you use the <<aop-aj-ltw-environment-generic, Spring-provided agent to enable
|
||||
If you use the <<aop-aj-ltw-environments-generic, Spring-provided agent to enable
|
||||
instrumentation>>, you also need:
|
||||
|
||||
* `spring-instrument.jar`
|
||||
|
||||
@@ -666,7 +666,7 @@ integrate such parsers into the Spring IoC container.
|
||||
To facilitate authoring configuration files that use a schema-aware XML editor,
|
||||
Spring's extensible XML configuration mechanism is based on XML Schema. If you are not
|
||||
familiar with Spring's current XML configuration extensions that come with the standard
|
||||
Spring distribution, you should first read the appendix entitled <<xsd-config>>.
|
||||
Spring distribution, you should first read the appendix entitled <<appendix.adoc#xsd-configuration>>.
|
||||
|
||||
To create new XML configuration extensions:
|
||||
|
||||
|
||||
@@ -543,7 +543,7 @@ enforced by the container, though no longer by XML parsers.
|
||||
You are not required to supply a `name` or an `id` for a bean. If you do not supply a
|
||||
`name` or `id` explicitly, the container generates a unique name for that bean. However,
|
||||
if you want to refer to that bean by name, through the use of the `ref` element or a
|
||||
<<beans-servicelocator,Service Locator>> style lookup, you must provide a name.
|
||||
Service Locator style lookup, you must provide a name.
|
||||
Motivations for not supplying a name are related to using <<beans-inner-beans,inner
|
||||
beans>> and <<beans-factory-autowire,autowiring collaborators>>.
|
||||
|
||||
@@ -4482,7 +4482,7 @@ with placeholder values is defined:
|
||||
The example shows properties configured from an external `Properties` file. At runtime,
|
||||
a `PropertySourcesPlaceholderConfigurer` is applied to the metadata that replaces some
|
||||
properties of the DataSource. The values to replace are specified as placeholders of the
|
||||
form `${property-name}`, which follows the Ant and log4j and JSP EL style.
|
||||
form pass:q[`${property-name}`], which follows the Ant and log4j and JSP EL style.
|
||||
|
||||
The actual values come from another file in the standard Java `Properties` format:
|
||||
|
||||
@@ -9543,7 +9543,7 @@ now looks like the following listing:
|
||||
The problem is how to switch between using these two variations based on the
|
||||
current environment. Over time, Spring users have devised a number of ways to
|
||||
get this done, usually relying on a combination of system environment variables
|
||||
and XML `<import/>` statements containing `${placeholder}` tokens that resolve
|
||||
and XML `<import/>` statements containing pass:q[`${placeholder}`] tokens that resolve
|
||||
to the correct configuration file path depending on the value of an environment
|
||||
variable. Bean definition profiles is a core container feature that provides a
|
||||
solution to this problem.
|
||||
|
||||
@@ -1314,7 +1314,7 @@ NOTE: The `proxy-target-class` attribute controls what type of transactional pro
|
||||
created for classes annotated with the `@Transactional` annotation. If
|
||||
`proxy-target-class` is set to `true`, class-based proxies are created. If
|
||||
`proxy-target-class` is `false` or if the attribute is omitted, standard JDK
|
||||
interface-based proxies are created. (See <<aop-proxying>> for a discussion of the
|
||||
interface-based proxies are created. (See <<core.adoc#aop-proxying>> for a discussion of the
|
||||
different proxy types.)
|
||||
|
||||
NOTE: `@EnableTransactionManagement` and `<tx:annotation-driven/>` looks for
|
||||
|
||||
@@ -589,7 +589,7 @@ in the same place as Spring's `GroovyObjectCustomizer`.
|
||||
|
||||
This section describes how to use BeanShell beans in Spring.
|
||||
|
||||
The BeanShell homepage includes the following description: {JB}
|
||||
The BeanShell homepage includes the following description:
|
||||
|
||||
"`BeanShell is a small, free, embeddable Java source interpreter with dynamic language
|
||||
features, written in Java. BeanShell dynamically executes standard Java syntax and
|
||||
|
||||
@@ -748,12 +748,12 @@ as the following example shows:
|
||||
|
||||
=== Injecting Configuration Properties
|
||||
|
||||
In Java, you can inject configuration properties by using annotations (such as `@Value("${property}")`).
|
||||
In Java, you can inject configuration properties by using annotations (such as pass:q[`@Value("${property}")`)].
|
||||
However, in Kotlin, `$` is a reserved character that is used for
|
||||
https://kotlinlang.org/docs/reference/idioms.html#string-interpolation[string interpolation].
|
||||
|
||||
Therefore, if you wish to use the `@Value` annotation in Kotlin, you need to escape the `$`
|
||||
character by writing `@Value("\${property}")`.
|
||||
character by writing pass:q[`@Value("\${property}")`].
|
||||
|
||||
NOTE: If you use Spring Boot, you should probably use
|
||||
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-typesafe-configuration-properties[`@ConfigurationProperties`]
|
||||
|
||||
@@ -781,7 +781,7 @@ use the following method arguments:
|
||||
|
||||
| `@DestinationVariable`
|
||||
| Value extracted from the route based on variables in the mapping pattern, e.g.
|
||||
`@MessageMapping("find.radar.{id}")`.
|
||||
pass:q[`@MessageMapping("find.radar.{id}")`].
|
||||
|
||||
| `@Header`
|
||||
| Metadata value registered for extraction as described in <<rsocket-metadata-extractor>>.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
[[webtestclient]]
|
||||
= WebTestClient
|
||||
:doc-root: https://docs.spring.io
|
||||
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
|
||||
|
||||
`WebTestClient` is a thin shell around <<web-reactive.adoc#webflux-client, WebClient>>,
|
||||
using it to perform requests and exposing a dedicated, fluent API for verifying responses.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
This part of the documentation covers support for reactive-stack web applications built
|
||||
on a https://www.reactive-streams.org/[Reactive Streams] API to run on non-blocking
|
||||
servers, such as Netty, Undertow, and Servlet 3.1+ containers. Individual chapters cover
|
||||
the <<webflux, Spring WebFlux>> framework,
|
||||
the <<webflux.adoc#webflux, Spring WebFlux>> framework,
|
||||
the reactive <<webflux-client, `WebClient`>>, support for <<webflux-test, testing>>,
|
||||
and <<webflux-reactive-libraries, reactive libraries>>. For Servlet-stack web applications,
|
||||
see <<web.adoc#spring-web, Web on Servlet Stack>>.
|
||||
|
||||
@@ -9,7 +9,7 @@ particular architecture, technology, or methodology (although it certainly recom
|
||||
some over others). This freedom to pick and choose the architecture, technology, or
|
||||
methodology that is most relevant to a developer and their development team is
|
||||
arguably most evident in the web area, where Spring provides its own web frameworks
|
||||
(<<mvc, Spring MVC>> and <<webflux, Spring WebFlux>>) while, at the same time,
|
||||
(<<mvc, Spring MVC>> and <<webflux.adoc#webflux, Spring WebFlux>>) while, at the same time,
|
||||
supporting integration with a number of popular third-party web frameworks.
|
||||
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ RouterFunction<ServerResponse> route = route()
|
||||
.add(otherRoute) // <4>
|
||||
.build();
|
||||
----
|
||||
<1> `GET /person/{id}` with an `Accept` header that matches JSON is routed to
|
||||
<1> pass:q[`GET /person/{id}`] with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.getPerson`
|
||||
<2> `GET /person` with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.listPeople`
|
||||
@@ -562,7 +562,7 @@ RouterFunction<ServerResponse> route = route()
|
||||
POST("/person", handler::createPerson) // <3>
|
||||
}.and(otherRoute) // <4>
|
||||
----
|
||||
<1> `GET /person/{id}` with an `Accept` header that matches JSON is routed to
|
||||
<1> pass:q[`GET /person/{id}`] with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.getPerson`
|
||||
<2> `GET /person` with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.listPeople`
|
||||
@@ -854,4 +854,4 @@ Besides using the `filter` method on the router function builder, it is possible
|
||||
filter to an existing router function via `RouterFunction.filter(HandlerFilterFunction)`.
|
||||
|
||||
NOTE: CORS support for functional endpoints is provided through a dedicated
|
||||
<<webflux-cors-webfilter, `CorsWebFilter`>>.
|
||||
<<webflux-cors.adoc#webflux-cors-webfilter, `CorsWebFilter`>>.
|
||||
|
||||
@@ -674,7 +674,7 @@ Spring WebFlux provides fine-grained support for CORS configuration through anno
|
||||
controllers. However, when you use it with Spring Security, we advise relying on the built-in
|
||||
`CorsFilter`, which must be ordered ahead of Spring Security's chain of filters.
|
||||
|
||||
See the section on <<webflux-cors>> and the <<webflux-cors-webfilter>> for more details.
|
||||
See the section on <<webflux-cors>> and the <<webflux-cors.adoc#webflux-cors-webfilter>> for more details.
|
||||
|
||||
|
||||
|
||||
@@ -1960,7 +1960,7 @@ can require type conversion if the argument is declared as something other than
|
||||
|
||||
For such cases, type conversion is automatically applied based on the configured converters.
|
||||
By default, simple types (such as `int`, `long`, `Date`, and others) are supported. Type conversion
|
||||
can be customized through a `WebDataBinder` (see <<mvc-ann-initbinder>>) or by registering
|
||||
can be customized through a `WebDataBinder` (see <<webflux-ann-initbinder>>) or by registering
|
||||
`Formatters` with the `FormattingConversionService` (see <<core.adoc#format, Spring Field Formatting>>).
|
||||
|
||||
|
||||
@@ -2162,7 +2162,7 @@ to `false` or by declaring the argument with a `java.util.Optional`
|
||||
wrapper.
|
||||
|
||||
Type conversion is applied automatically if the target method parameter type is not
|
||||
`String`. See <<mvc-ann-typeconversion>>.
|
||||
`String`. See <<webflux-ann-typeconversion>>.
|
||||
|
||||
When a `@RequestParam` annotation is declared on a `Map<String, String>` or
|
||||
`MultiValueMap<String, String>` argument, the map is populated with all query parameters.
|
||||
@@ -2223,7 +2223,7 @@ The following example gets the value of the `Accept-Encoding` and `Keep-Alive` h
|
||||
<2> Get the value of the `Keep-Alive` header.
|
||||
|
||||
Type conversion is applied automatically if the target method parameter type is not
|
||||
`String`. See <<mvc-ann-typeconversion>>.
|
||||
`String`. See <<webflux-ann-typeconversion>>.
|
||||
|
||||
When a `@RequestHeader` annotation is used on a `Map<String, String>`,
|
||||
`MultiValueMap<String, String>`, or `HttpHeaders` argument, the map is populated
|
||||
@@ -2273,7 +2273,7 @@ The following code sample demonstrates how to get the cookie value:
|
||||
|
||||
|
||||
Type conversion is applied automatically if the target method parameter type is not
|
||||
`String`. See <<mvc-ann-typeconversion>>.
|
||||
`String`. See <<webflux-ann-typeconversion>>.
|
||||
|
||||
|
||||
[[webflux-ann-modelattrib-method-args]]
|
||||
@@ -3265,7 +3265,7 @@ controller-specific `Formatter` instances, as the following example shows:
|
||||
=== Managing Exceptions
|
||||
[.small]#<<web.adoc#mvc-ann-exceptionhandler, Web MVC>>#
|
||||
|
||||
`@Controller` and <<mvc-ann-controller-advice, @ControllerAdvice>> classes can have
|
||||
`@Controller` and <<webflux-ann-controller-advice, @ControllerAdvice>> classes can have
|
||||
`@ExceptionHandler` methods to handle exceptions from controller methods. The following
|
||||
example includes such a handler method:
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ as the following example shows:
|
||||
|
||||
[[mvc-cors-filter]]
|
||||
== CORS Filter
|
||||
[.small]#<<web-reactive.adoc#webflux-cors-webfilter, WebFlux>>#
|
||||
[.small]#<<webflux-cors.adoc#webflux-cors-webfilter, WebFlux>>#
|
||||
|
||||
You can apply CORS support through the built-in
|
||||
{api-spring-framework}/web/filter/CorsFilter.html[`CorsFilter`].
|
||||
|
||||
@@ -475,7 +475,7 @@ The following example shows the composition of four routes:
|
||||
.add(otherRoute) // <4>
|
||||
.build();
|
||||
----
|
||||
<1> `GET /person/{id}` with an `Accept` header that matches JSON is routed to
|
||||
<1> pass:q[`GET /person/{id}`] with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.getPerson`
|
||||
<2> `GET /person` with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.listPeople`
|
||||
@@ -500,7 +500,7 @@ The following example shows the composition of four routes:
|
||||
POST("/person", handler::createPerson) // <3>
|
||||
}.and(otherRoute) // <4>
|
||||
----
|
||||
<1> `GET /person/{id}` with an `Accept` header that matches JSON is routed to
|
||||
<1> pass:q[`GET /person/{id}`] with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.getPerson`
|
||||
<2> `GET /person` with an `Accept` header that matches JSON is routed to
|
||||
`PersonHandler.listPeople`
|
||||
@@ -787,4 +787,4 @@ Besides using the `filter` method on the router function builder, it is possible
|
||||
filter to an existing router function via `RouterFunction.filter(HandlerFilterFunction)`.
|
||||
|
||||
NOTE: CORS support for functional endpoints is provided through a dedicated
|
||||
<<webflux-cors-webfilter, `CorsWebFilter`>>.
|
||||
<<webmvc-cors.adoc#mvc-cors-filter, `CorsFilter`>>.
|
||||
|
||||
@@ -512,9 +512,9 @@ https://host:port/myApp/myEndpoint/{server-id}/{session-id}/{transport}
|
||||
|
||||
where:
|
||||
|
||||
* `{server-id}` is useful for routing requests in a cluster but is not used otherwise.
|
||||
* `{session-id}` correlates HTTP requests belonging to a SockJS session.
|
||||
* `{transport}` indicates the transport type (for example, `websocket`, `xhr-streaming`, and others).
|
||||
* pass:q[`{server-id}`] is useful for routing requests in a cluster but is not used otherwise.
|
||||
* pass:q[`{session-id}`] correlates HTTP requests belonging to a SockJS session.
|
||||
* pass:q[`{transport}`] indicates the transport type (for example, `websocket`, `xhr-streaming`, and others).
|
||||
|
||||
The WebSocket transport needs only a single HTTP request to do the WebSocket handshake.
|
||||
All messages thereafter are exchanged on that socket.
|
||||
@@ -1254,7 +1254,7 @@ level, `@MessageMapping` is used to express shared mappings across all methods i
|
||||
controller.
|
||||
|
||||
By default, the mapping values are Ant-style path patterns (for example `/thing*`, `/thing/**`),
|
||||
including support for template variables (for example, `/thing/{id}`). The values can be
|
||||
including support for template variables (for example, pass:q[`/thing/{id}`]). The values can be
|
||||
referenced through `@DestinationVariable` method arguments. Applications can also switch to
|
||||
a dot-separated destination convention for mappings, as explained in
|
||||
<<websocket-stomp-destination-separator>>.
|
||||
@@ -1862,7 +1862,7 @@ with other users who subscribe to the same destination so that each user can rec
|
||||
unique stock position updates.
|
||||
|
||||
On the sending side, messages can be sent to a destination such as
|
||||
`/user/{username}/queue/position-updates`, which in turn is translated
|
||||
pass:q[`/user/{username}/queue/position-updates`], which in turn is translated
|
||||
by the `UserDestinationMessageHandler` into one or more destinations, one for each
|
||||
session associated with the user. This lets any component within the application
|
||||
send messages that target a specific user without necessarily knowing anything more
|
||||
|
||||
Reference in New Issue
Block a user