上传文件时,服务器报错:IOFileUploadException: Processing of multipart/form-data request failed. 设备上没有空间

1. 问题

SpringBoot上传文件时,服务器报错

2022-06-27 10:58:00.941 ERROR 12700 --- [nio-8900-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; 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. 设备上没有空间] with root cause

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. No space left on device] with root cause
java.io.IOException: No space left on device

2. 处理办法

配置文件中增加如下配置

server:
  port: 8900
  tomcat:
    basedir: /opt/project/temp

猜你喜欢

转载自blog.csdn.net/qq_39198749/article/details/125480716
今日推荐