在Spring Boot应用程序中进行多部分文件上传在Tomcat版本9.0.31中无法正常工作。但是,这个功能在较旧的版本9.0.30中可以很好地工作。但是,在这个版本中存在漏洞,被迫升级版本。请参见下面给出的错误。
"timestamp": "2020-03-09T08:01:56.169+0000",
"status": 500,
"error": "Internal Server Error",
"message": "Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly",
以下是错误日志
nested exception is org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly] with root causeorg.apache.tomcat.util.http.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
请帮忙解决这个问题。