您尝试过流吗?
Jsp代码:
<form method="POST" onsubmit=""ACTION="url?${_csrf.parameterName}=${_csrf.token}" ENCTYPE="multipart/form-data">控制器:
@RequestMapping( value = "url", method = RequestMethod.POST)public void uploadFile( @RequestParam("file") MultipartFile file) throws IOException { InputStream input = upfile.getInputStream(); Path path = Paths.get(path);//check path OutputStream output = Files.newOutputStream(path); IOUtils.copy(in, out); //org.apache.commons.io.IOUtils or you can create IOUtils.copy}Spring 4.0和Spring Security对我有用。
其次,您应该检查http连接是否超时。Chrome浏览器不支持该配置。因此,您可以使用firefox并在此处关注http://morgb.blogspot.com.es/2014/05/firefox-29-and-
http-response-
timeout.html。



