核心代码 由于HttpServletRequest不能直接取出文件数据,所以将其强制转换为MultipartHttpServletRequest MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; List files = multipartRequest.getFiles(“files”); POST /*提交表单*/ function myupload() { $.ajax({ url:"/exUploadContro