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

Consolidate HTTP Interface client support for MultipartFile and @RequestPart #31164

Conversation

bdshadow
Copy link
Contributor

@bdshadow bdshadow commented Sep 3, 2023

As described in the ticket, I've merged MultipartFileArgumentResolver into the RequestPartArgumentResolver. I also think this is a better option since the javadoc for@RequestPart explicitly mentions work with the MultipartFile.

However, I'm unsure if MultipartFileArgumentResolver must be removed now. Probably it can, since the release 6.1 isn't out yet, so it's present only in the pre-releases.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 3, 2023
@rstoyanchev rstoyanchev self-assigned this Sep 7, 2023
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 7, 2023
@rstoyanchev rstoyanchev added this to the 6.1.0-RC1 milestone Sep 7, 2023
@rstoyanchev rstoyanchev changed the title merge multipartfile and requestpart resolvers Consolidate HTTP Interface client support for MultipartFile and @RequestPart Sep 7, 2023
Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request. Indeed, as we merge the two into one, we would no longer need MultipartFileArgumentResolver and since it is not yet released, it can be removed, and likewise the test classes should also be merged into one.

Would you like to apply those changes?

@bdshadow
Copy link
Contributor Author

bdshadow commented Sep 8, 2023

@rstoyanchev yes, i will do it

…tArgumentResolverTests

Signed-off-by: Dmitrii Bocharov <bdshadow@gmail.com>
rstoyanchev pushed a commit that referenced this pull request Sep 11, 2023
Also add test with Optional parameter for a RequestPart argument.

See gh-31164

Signed-off-by: Dmitrii Bocharov <bdshadow@gmail.com>
rstoyanchev added a commit that referenced this pull request Sep 11, 2023
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Sep 11, 2023

This is now merged, thanks for the pull request.

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

Successfully merging this pull request may close these issues.

HTTP Interface client should not fail if @RequestPart used with MultipartFile
3 participants