前端ajax传递数组到后台springmvc

前端代码:

 $.ajax({
        url: '/role/assignPerms',
           type: 'post',
           data: {'ids': checked},
           traditional:true,
           success: function (data) {
           }
       })

前端代码传到后台需要加traditional:true,
后台代码:

@PostMapping("/assignPerms")
    public RespData assignPerms(@RequestParam(value = "ids") List<Integer> ids) {
        System.out.println(ids);
        return RespData.success();
    }