diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index 7e1e52d3c4..21818a7814 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -2993,7 +2993,17 @@ configure or customize message writing. WebFlux supports using a single value <> to produce the `ResponseEntity` asynchronously, and/or single and multi-value reactive types -for the body. +for the body. This allows a variety of async responses with `ResponseEntity` as follows: + +* `ResponseEntity>` or `ResponseEntity>` make the response status and + headers known immediately while the body is provided asynchronously at a later point. + Use `Mono` if the body consists of 0..1 values or `Flux` if it can produce multiple values. +* `Mono>` provides all three -- response status, headers, and body, + asynchronously at a later point. This allows the response status and headers to vary + depending on the outcome of asynchronous request handling. +* `Mono>>` or `Mono>>` are yet another + possible, albeit less common alternative. They provides the response status and headers + asynchronously first and then the response body, also asynchronously at a second point later. [[webflux-ann-jackson]] diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index abe6ddeb15..b8666a1f8b 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -3316,7 +3316,14 @@ See <> for details. Spring MVC supports using a single value <> to produce the `ResponseEntity` asynchronously, and/or single and multi-value reactive -types for the body. +types for the body. This allows the following types of async responses: + +* `ResponseEntity>` or `ResponseEntity>` make the response status and + headers known immediately while the body is provided asynchronously at a later point. + Use `Mono` if the body consists of 0..1 values or `Flux` if it can produce multiple values. +* `Mono>` provides all three -- response status, headers, and body, + asynchronously at a later point. This allows the response status and headers to vary + depending on the outcome of asynchronous request handling. [[mvc-ann-jackson]]