@ -55,8 +55,6 @@ public class ResponseEntityResultHandler extends AbstractMessageWriterResultHand
@@ -55,8 +55,6 @@ public class ResponseEntityResultHandler extends AbstractMessageWriterResultHand
@ -121,8 +119,7 @@ public class ResponseEntityResultHandler extends AbstractMessageWriterResultHand
@@ -121,8 +119,7 @@ public class ResponseEntityResultHandler extends AbstractMessageWriterResultHand
if(adapter!=null){
Assert.isTrue(!adapter.isMultiValue(),"Only a single ResponseEntity supported");
@ -123,9 +121,8 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@@ -123,9 +121,8 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@ -153,7 +150,7 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@@ -153,7 +150,7 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@ -172,7 +169,6 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@@ -172,7 +169,6 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@ -184,12 +180,6 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@@ -184,12 +180,6 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
@ -1749,10 +1749,14 @@ controller. The following code snippet shows the usage:
@@ -1749,10 +1749,14 @@ controller. The following code snippet shows the usage:
[TIP]
====
<<<<<<< HEAD
Unlike the Servlet API "request parameter" concept that conflates query parameters, form
=======
Unlike the Servlet API "request paramater" concept that conflate query parameters, form
>>>>>>> parent of 7e91733502... Infer HTTP 404 from empty Optional/Publisher types
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
use data binding to apply query paramerters, form data, and multiparts to a
@ -2275,22 +2279,6 @@ on a container object that specifies request headers and body. Below is an examp
@@ -2275,22 +2279,6 @@ on a container object that specifies request headers and body. Below is an examp
}
----
As is the case for many return values, `ResponseEntity` can be wrapped by a reactive type
such as `Mono`. In case of a `Mono<ResponseEntity>` 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 a `switchIfEmpty` / `defaultIfEmpty` for
simple HTTP 404 responses. Here's an example of this:
@ -1816,7 +1816,7 @@ supported for all return values, see below for more details.
@@ -1816,7 +1816,7 @@ supported for all return values, see below for more details.
| The return value is converted through ``HttpMessageConverter``s and written to the
| The return value specifies the full response including HTTP headers and body be converted
through ``HttpMessageConverter``s and written to the response.
See <<mvc-ann-responseentity>>.
@ -2660,21 +2660,6 @@ on a container object that specifies request headers and body. Below is an examp
@@ -2660,21 +2660,6 @@ on a container object that specifies request headers and body. Below is an examp
}
----
In case of a `java.util.Optional<ResponseEntity>` 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:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@GetMapping("/user")
public Optional<ResponseEntity<User>> fetchUser() {