Skip to content

Support for java.util.Optional as a @RequestBody [SPR-15007] #19574

Closed

Description

@spring-projects-issues

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:

Referenced from: commits f3cc4ab, eeb7ae5

Activity

  1. spring-projects-issues commented on Dec 13, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    This is aligned with our Optional support for @RequestPart arguments now (#17245). To be backported to 4.3.5.

  2. added
    type: enhancement
    in: web
    on Jan 11, 2019
  3. added this to the 4.3.5 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions