Clashing method signatures
I'm trying to create a rest controller with two save methods. One for saving a single entity and one for saving a list of entities.
@RequestMapping(method = [POST, PUT])
fun save(@RequestBody entity: T): T {
return service.save(entity)
}
@RequestMapping(method = [POST, PUT])
fun save(@RequestBody entities: List): List {
return service.save(entities)
}
However due to, what I assume is, type erasure spring throws the following exception....