当用get请求下载或导出文件时,需要接收list参数,一种笨方法,用字符串接收后再转为list。
@GetMapping("/export")
public void exportExcel(HttpServletRequest request, HttpServletResponse response, @RequestParam("userIdListStr") String userIdListStr, ) throws Exception {
List<String> userIdList = Arrays.asList(userIdListStr.split(","));
}