当前位置:
首页 >
行业知识 >
Java中SpringBoot上传文件时报错:org.springframework.web.multipart.MaxUploadSizeExceededException
行业知识
Java中SpringBoot上传文件时报错:org.springframework.web.multipart.MaxUploadSizeExceededException
2026-11-03 07:23:57
来源:互联网转载
完整报错信息:
index.php/tags-1038.html" >org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException:
org.apache.tomcat.util.http.fileupload.impl.SizeLimitExceededException: the request was rejected because its size (803477000) exceeds the configured maximum (20971520)
原因:文件上传大小超出配置文件中的限制
解决方案:修改配置文件
找到配置中的spring:servlet:multipart下的文件大小配置,修改为大于你文件大小的值即可。