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

Spring MVC - Kotlin: Cannot bind MultipartFile in constructor [SPR-17640] #22169

Closed
spring-projects-issues opened this issue Jan 4, 2019 · 0 comments
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

Ryan Bohn opened SPR-17640 and commented

When using spring mvc with Kotlin,  I prefer to use data classes  with immutable fields.  This works for most cases.  However, when I'm using MultipartFile as a field on a request object, I am forced to use a var field and make the field nullable in order to get it to work.

I've attached a sample project exhibiting this behavior.  Just follow the instructions in the README.txt.


Affects: 5.1.3

Attachments:

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.2 RC1 milestone Jan 11, 2019
@jhoeller jhoeller modified the milestones: 5.2 M1, 5.2 M2 Jan 30, 2019
@jhoeller jhoeller modified the milestones: 5.2 M2, 5.2 M3 Apr 26, 2019
@jhoeller jhoeller modified the milestones: 5.2 M3, 5.2 RC1 Jun 7, 2019
@jhoeller jhoeller modified the milestones: 5.2 RC1, 5.x Backlog Jul 29, 2019
@jhoeller jhoeller modified the milestones: 5.x Backlog, 5.3 M1 Sep 9, 2019
@jhoeller jhoeller modified the milestones: 5.3 M1, 5.3 M2 Jun 16, 2020
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