Skip to content

Commit a3a9495

Browse files
simonbaslesbrannen
authored andcommitted
Rework linking to Spring MVC Async support vs WebFlux section
The link was previously named "Compared to WebFlux", which is easy to mix up with the various links to equivalent sections in the WebFlux chapter. Here the links point to a small section comparing the Servlet Async API to the WebFlux stack from a high perspective. In this commit we eliminate most of these links, except at the beginning of the Asynchronous section. We also add a small mention of the Servlet configuration in the comparison paragraphs, since the Configuring section is the one furthest from the comparison paragraphs that used to have a link to it. Closes gh-29694
1 parent b51a14f commit a3a9495

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

framework-docs/src/docs/asciidoc/web/webmvc.adoc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,7 +4366,6 @@ capital letters of the class and the method name (for example, the `getThing` me
43664366

43674367
[[mvc-ann-async]]
43684368
== Asynchronous Requests
4369-
[.small]#<<mvc-ann-async-vs-webflux, Compared to WebFlux>>#
43704369

43714370
Spring MVC has an extensive integration with Servlet asynchronous request
43724371
<<mvc-ann-async-processing,processing>>:
@@ -4379,11 +4378,10 @@ return value.
43794378
* Controllers can use reactive clients and return
43804379
<<mvc-ann-async-reactive-types, reactive types>> for response handling.
43814380

4382-
4381+
For an overview of how this differs from Spring WebFlux, see the <<mvc-ann-async-vs-webflux>> section below.
43834382

43844383
[[mvc-ann-async-deferredresult]]
43854384
=== `DeferredResult`
4386-
[.small]#<<mvc-ann-async-vs-webflux, Compared to WebFlux>>#
43874385

43884386
Once the asynchronous request processing feature is <<mvc-ann-async-configuration, enabled>>
43894387
in the Servlet container, controller methods can wrap any supported controller method
@@ -4425,7 +4423,6 @@ example, in response to an external event (JMS message), a scheduled task, or ot
44254423

44264424
[[mvc-ann-async-callable]]
44274425
=== `Callable`
4428-
[.small]#<<mvc-ann-async-vs-webflux, Compared to WebFlux>>#
44294426

44304427
A controller can wrap any supported return value with `java.util.concurrent.Callable`,
44314428
as the following example shows:
@@ -4455,7 +4452,6 @@ The return value can then be obtained by running the given task through the
44554452

44564453
[[mvc-ann-async-processing]]
44574454
=== Processing
4458-
[.small]#<<mvc-ann-async-vs-webflux, Compared to WebFlux>>#
44594455

44604456
Here is a very concise overview of Servlet asynchronous request processing:
44614457

@@ -4533,7 +4529,7 @@ methods for timeout and completion callbacks.
45334529

45344530

45354531
[[mvc-ann-async-vs-webflux]]
4536-
==== Compared to WebFlux
4532+
==== Async Spring MVC compared to WebFlux
45374533

45384534
The Servlet API was originally built for making a single pass through the Filter-Servlet
45394535
chain. Asynchronous request processing lets applications exit the Filter-Servlet chain
@@ -4560,6 +4556,8 @@ types in controller method arguments (for example, `@RequestBody`, `@RequestPart
45604556
nor does it have any explicit support for asynchronous and reactive types as model attributes.
45614557
Spring WebFlux does support all that.
45624558

4559+
Finally, from a configuration perspective the asynchronous request processing feature must be
4560+
<<mvc-ann-async-configuration, enabled at the Servlet container level>>.
45634561

45644562

45654563
[[mvc-ann-async-http-streaming]]
@@ -4809,7 +4807,6 @@ that have a built-in heartbeat mechanism.
48094807

48104808
[[mvc-ann-async-configuration]]
48114809
=== Configuration
4812-
[.small]#<<mvc-ann-async-vs-webflux, Compared to WebFlux>>#
48134810

48144811
The asynchronous request processing feature must be enabled at the Servlet container level.
48154812
The MVC configuration also exposes several options for asynchronous requests.

0 commit comments

Comments
 (0)