后台Control接受前端传来的数组时,需要添加注解才能接收到。
@RequestMapping(value = "/testJava", produces = "text/html;charset=UTF-8")
@ResponseBody
private String testJava(HttpServletRequest request, HttpServletResponse response,
@RequestParam(value = "exportArr[]") String[] exportArr) throws ServletException,
IOException {
return JsonUtils.toJson("");
}
控制台打印用log4j,不要用syso,syse
logger.info("####################打印例子);