网上千篇一律,分析得条条是道,但是并没有解决方案
这里记录一下我遇到的问题:
1.环境:springboot跑的服务,
2.有个文件上传功能,上线时跑得很正常,但是服务器网络调整一次后,就出现了java.io.IOException: Connection reset by peer这样的错误;
3.出现的情况分为两种: 《1》公司内网访问处理附件上传正常(可以排除代码问题);《2》外网访问(4G),处理附件上传时就出了问题,但是外网的请求的确也进了服务器(百思不得其解),此时可以排除网络问题,报错如下:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: Connection reset by peer] with root cause
4.百度各种大佬的博客,都是解释了一大堆,没有一个明确的解决办法,最后原因找出来是公司防火墙禁止了文件上传。。。。。。。。。。。。。。。。。