Spring MVC - @Valid on list of beans in REST service

后端 未结 10 2191
醉酒成梦
醉酒成梦 2020-11-29 23:05

In a Spring MVC REST service (json), I have a controller method like this one :

@RequestMapping(method = RequestMethod.POST, value = { \"/doesntmatter\" })
         


        
10条回答
  •  情歌与酒
    2020-11-29 23:30

    There is a elegant way to wrapper your request in a custom java.util.List which acts as both List and JavaBean. see here

提交回复
热议问题