Skip to content

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

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

Closed
spring-projects-issues opened this issue Dec 12, 2016 · 1 comment
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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:

Referenced from: commits f3cc4ab, eeb7ae5

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 13, 2016

Juergen Hoeller commented

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants