Skip to content

Support for java.util.Optional as a @RequestPart [SPR-12644] #17245

Closed
@spring-projects-issues

Description

@spring-projects-issues

Anderson Vaz opened SPR-12644 and commented

In issue #16448 was introduced support for java.util.Optional for @ResquestParam Controllers method parameters however it was not spread to @RequestPart parameters.
Attached is a project Spring Boot demonstrating the issue. When the parameter is @RequestPart and Optional, Spring can't convert the value.

I think that would be nice to have this feature implemented for @RequestPart parameters too.

Thanks!


Affects: 4.1.3, 4.1.4

Reference URL: https://github.com/avaz/spring-bug-optional-requestpart.git

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions