spring mvc参数接收数组

参数:

 ?deptIds=1,2,3&dept1Ids=1,2,3&dept2Ids=1,2,3&dept3Ids=1,2,3

接收

(@RequestParam("deptIds") ArrayList deptIds,
                                            @RequestParam("dept1Ids") ArrayList dept1Ids,
                                             Long[] dept2Ids,
                                            String[] dept3Ids)
 

结果:

image.png

你可能感兴趣的:(spring mvc参数接收数组)