Skip to content

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

@spring-projects-issues

Description

@spring-projects-issues

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:

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