Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15007

Support for java.util.Optional as a @RequestBody

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.3.5, 5.0 M4
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              jamesmhowe James Howe
              Last updater:
              Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 6 weeks, 6 days ago