Skip to content

Different behaviour with controller query parameters mapping in object in Kotlin and Java #25182

@Ivanbmstu

Description

@Ivanbmstu

Spring boot 2.3.0, java 11.

Hello everyone, i trying to map query params into object with kotlin data class.
When i query my controller with params /?values=1,2,3, then list parameter maps into one string instead of list of strings.
After that i decided to reproduce this error with java service, on pojo without constructor values maps correctly, on pojo with constructor values maps into single string.

Expected behaviour: query parameter maps in both cases into list divided by coma separator

Is it correct behaviour or bug? I dont think it is spring boot issue, so i created it in the spring-framework repository

Sorry for my english.

Repo to reproduce: https://github.com/Ivanbmstu/spring_query_mapping

Run build in both modules (Kotlin and Java)

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: bugA general bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions