Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

spring-projects-issues opened this issue Dec 12, 2016 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Dec 12, 2016

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:

  • #16448 Support for java.util.Optional as a @RequestParam
  • #13877 @RequestBody should have a required parameter to allow a request body to be optional
  • #17245 Support for java.util.Optional as a @RequestPart

Referenced from: commits f3cc4ab, eeb7ae5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.