打印全部请求参数、文件名
@RequestMapping(value = "/test") @ResponseBody public MResult test (HttpServletRequest request, @RequestParam Map<String,Object> params){ try{ System.out.println(params); MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; System.out.println(multipartRequest.getFileMap()); Iterator<String> files = multipartRequest.getFileNames(); while(files.hasNext()){ System.out.println(multipartRequest.getFile(files.next()).getName()); } }catch (Exception e){ e.printStackTrace(); } return new MResult(MResult.SUCCESS); }