I have the following controller method:
@RequestMapping(value=\"/map/update\", method=RequestMethod.POST, produces = \"application/json; charset=utf-8\")
@Re
@Paul Strack's great solution mixed with Lombok magic:
@Data
public class ValidList implements List {
@Valid
@Delegate
private List list = new ArrayList<>();
}
Usage (swap List for ValidList):
public ResponseEntityWrapper updateMapTheme(
@RequestBody @Valid ValidList categories, ...)
(Needs Lombok, but if you don't use it already you really want to try it out)