I have an endpoint which can accept dozens of request params. It would be nice to collect all these params in a data class. Additionally, the request params must be separated by commas
`path?param=1,2`
to keep backward compatibility.
Assume we have this endpoint:

```
@GetMapping("path")
fun someFun(@RequestParam param: Set<Int> = emptySet()
   ...other 11 params
)

```

I created a data class to collect all the request params:

```
data class ClusteredParams(val param: Set<Int> = emptySet()
   ...other 11 params
)

```

So the endpoint looks like the following:

```
@GetMapping("path")
fun someFun(param: ClusteredParams)

```

When I called `path?param=1,2` I got:

> 
> "error": "Failed to convert value of type java.lang.String[] to required type java.util.Set; nested exception is java.lang.NumberFormatException: For input string: "1,2"",
> "field": "param",
> "rejectedValue": "1,2"
> 
> 
> 

When I call `path?param=1&param=2` everything is fine. **This problem does not exist when ClusteredParams class is written in Java**.

```
public class ClusteredParams {
   private Set<Int> param;
   ...other 11 params

   getters and setters
}

```