Closed
Description
James Howe opened SPR-15007 and commented
Unlike @RequestParam
or @PathVariable
, @RequestBody
doesn't seem to understand that an Optional
type should imply required=false
, nor that Optional.empty()
should be passed rather than null
.
Affects: 4.3.4
Issue Links:
- Support for java.util.Optional as a @RequestParam [SPR-11829] #16448 Support for java.util.Optional as a
@RequestParam
- @RequestBody should have a required parameter to allow a request body to be optional [SPR-9239] #13877
@RequestBody
should have a required parameter to allow a request body to be optional - Support for java.util.Optional as a @RequestPart [SPR-12644] #17245 Support for java.util.Optional as a
@RequestPart