diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index 73800c20843d5d2d5eb26c373e30ee14656bad44..4f3816e822134ad2ea390858e73a2561e23ab024 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -1749,7 +1749,7 @@ controller. The following code snippet shows the usage: [TIP] ==== -Unlike the Servlet API "request parameter" concept that conflate query parameters, form +Unlike the Servlet API "request parameter" concept that conflates query parameters, form data, and multiparts into one, in WebFlux each is accessed individually through the `ServerWebExchange`. While `@RequestParam` binds to query parameters only, you can use data binding to apply query parameters, form data, and multiparts to a @@ -1758,17 +1758,17 @@ use data binding to apply query parameters, form data, and multiparts to a Method parameters using using the `@RequestParam` annotation are required by default, but you can specify that a method parameter is optional by setting ``@RequestParam``'s -`required` flag to `false` or by declaring the argument with an `java.util.Optional` +`required` flag 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 <>. -When an `@RequestParam` annotation is declared as `Map` or +When an `@RequestParam` annotation is declared on a `Map` or `MultiValueMap` argument, the map is populated with all query parameters. -Note that use of `@RequestParam` is optional, e.g. to set its attributes. -By default any argument that is a simple value type, as determined by +Note that use of `@RequestParam` is optional -- for example, to set its attributes. By +default any argument that is a simple value type, as determined by {api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty], and is not resolved by any other argument resolver, is treated as if it was annotated with `@RequestParam`. @@ -2275,12 +2275,11 @@ on a container object that specifies request headers and body. Below is an examp } ---- -As many return values, `ResponseEntity` can be wrapped by a reactive type such as `Mono`. -In case of a `Mono` return type, the empty `Mono` case will be +As is the case for many return values, `ResponseEntity` can be wrapped by a reactive type +such as `Mono`. In case of a `Mono` return type, an empty `Mono` will be automatically converted to a `ResponseEntity` with an empty body and an HTTP 404 status, -so you don't need to chain your `Mono` with an `switchIfEmpty` / `defaultIfEmpty` for simple -HTTP 404 responses. -Here's an example of this: +so you don't need to chain your `Mono` with a `switchIfEmpty` / `defaultIfEmpty` for +simple HTTP 404 responses. Here's an example of this: [source,java,indent=0] [subs="verbatim,quotes"] diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index a39d1b0a0a7a1e4645a76ef694303191317a260b..96e90a497f36afec374981f18429b1fde9a70541 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -2661,10 +2661,9 @@ on a container object that specifies request headers and body. Below is an examp ---- In case of a `java.util.Optional` return type, the `Optional.empty()` -case will be automatically converted to a `ResponseEntity` with an empty body -and an HTTP 404 status, so you don't need to chain your optional with -an `orElse` / `orElseGet` for simple HTTP 404 responses. -Here's an example of this: +case will be automatically converted to a `ResponseEntity` with an empty body and an HTTP +404 status, so you don't need to chain your optional with an `orElse` / `orElseGet` for +simple HTTP 404 responses. Here's an example of this: [source,java,indent=0] [subs="verbatim,quotes"]