Jackson 解析List<Long>
为List<Integer>
,因此我得到一个ClassCastException
. 解决方案之一是将参数作为 aList<String>
但我不想这样做。有人可以建议我一个替代方案吗?
@RequestMapping(value = "/device/deleteNote", produces = "application/json", method = RequestMethod.POST)
@ResponseBody
public ResponseEntity<?> deleteNotification(@RequestBody ArrayList<Long> notificationIdListParam) {
....
}