多线程下,压缩图片调用file.getInputStream(),会出现 File has been moved - cannot be read again。
单线程是好的,不需要配置 maxInMemorySize
多线程下 配置了tomcat的 maxInMemorySize 就好了。
问题是,为何多线程会出现,单线程不会
暴裂无球的博客记一次映像深刻的bug—File has been moved - cannot be read again 每天多学一点点~ 话不多说,这就开始吧… 文章目录记一次映像深刻的bug---File has been moved - cannot be read again1.前言2.代码3.分析6.结语 ...
小米10129的博客最近做的功能涉及到解析excel,解析文件时,每次调用multipartFile.getInputStream(),就会出异常java.lang.IllegalStateException: File has been moved - cannot be read again。 SpringMVC上传文件时,需要...
weixin_30730151的博客在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again”,网上一般说需要配置maxInMemorySize,自己测试发现,maxInMemorySize确实会...
lijie2049的博客使用SPRING上传文件偶尔遇到报错: ...java.lang.IllegalStateException: File has been moved - cannot be read again at org.springframework.web.multipart.commons.CommonsMultipartFile.getInputStream(Commo...
weixin_30685047的博客使用poi上传.xlsx文件时,...Exception in thread "pool-3-thread-2" java.lang.IllegalStateException: File has been moved - cannot be read again at org.springframework.web.multipart.commons.CommonsMul...