Skip to content

Commit a87b319

Browse files
committed
Polishing
1 parent 7e91733 commit a87b319

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

src/docs/asciidoc/web/webflux.adoc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,7 @@ controller. The following code snippet shows the usage:
17491749

17501750
[TIP]
17511751
====
1752-
Unlike the Servlet API "request parameter" concept that conflate query parameters, form
1752+
Unlike the Servlet API "request parameter" concept that conflates query parameters, form
17531753
data, and multiparts into one, in WebFlux each is accessed individually through the
17541754
`ServerWebExchange`. While `@RequestParam` binds to query parameters only, you can
17551755
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
17581758

17591759
Method parameters using using the `@RequestParam` annotation are required by default, but
17601760
you can specify that a method parameter is optional by setting ``@RequestParam``'s
1761-
`required` flag to `false` or by declaring the argument with an `java.util.Optional`
1761+
`required` flag to `false` or by declaring the argument with a `java.util.Optional`
17621762
wrapper.
17631763

17641764
Type conversion is applied automatically if the target method parameter type is not
17651765
`String`. See <<mvc-ann-typeconversion>>.
17661766

1767-
When an `@RequestParam` annotation is declared as `Map<String, String>` or
1767+
When an `@RequestParam` annotation is declared on a `Map<String, String>` or
17681768
`MultiValueMap<String, String>` argument, the map is populated with all query parameters.
17691769

1770-
Note that use of `@RequestParam` is optional, e.g. to set its attributes.
1771-
By default any argument that is a simple value type, as determined by
1770+
Note that use of `@RequestParam` is optional -- for example, to set its attributes. By
1771+
default any argument that is a simple value type, as determined by
17721772
{api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty],
17731773
and is not resolved by any other argument resolver, is treated as if it was annotated
17741774
with `@RequestParam`.
@@ -2275,12 +2275,11 @@ on a container object that specifies request headers and body. Below is an examp
22752275
}
22762276
----
22772277

2278-
As many return values, `ResponseEntity` can be wrapped by a reactive type such as `Mono`.
2279-
In case of a `Mono<ResponseEntity>` return type, the empty `Mono` case will be
2278+
As is the case for many return values, `ResponseEntity` can be wrapped by a reactive type
2279+
such as `Mono`. In case of a `Mono<ResponseEntity>` return type, an empty `Mono` will be
22802280
automatically converted to a `ResponseEntity` with an empty body and an HTTP 404 status,
2281-
so you don't need to chain your `Mono` with an `switchIfEmpty` / `defaultIfEmpty` for simple
2282-
HTTP 404 responses.
2283-
Here's an example of this:
2281+
so you don't need to chain your `Mono` with a `switchIfEmpty` / `defaultIfEmpty` for
2282+
simple HTTP 404 responses. Here's an example of this:
22842283

22852284
[source,java,indent=0]
22862285
[subs="verbatim,quotes"]

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2661,10 +2661,9 @@ on a container object that specifies request headers and body. Below is an examp
26612661
----
26622662

26632663
In case of a `java.util.Optional<ResponseEntity>` return type, the `Optional.empty()`
2664-
case will be automatically converted to a `ResponseEntity` with an empty body
2665-
and an HTTP 404 status, so you don't need to chain your optional with
2666-
an `orElse` / `orElseGet` for simple HTTP 404 responses.
2667-
Here's an example of this:
2664+
case will be automatically converted to a `ResponseEntity` with an empty body and an HTTP
2665+
404 status, so you don't need to chain your optional with an `orElse` / `orElseGet` for
2666+
simple HTTP 404 responses. Here's an example of this:
26682667

26692668
[source,java,indent=0]
26702669
[subs="verbatim,quotes"]

0 commit comments

Comments
 (0)