Java中SpringBoot上传文件时报错:org.springframework.web.multipart.MaxUploadSizeExceededException
完整报错信息:
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下的文件大小配置,修改为大于你文件大小的值即可。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。
还没有评论,来说两句吧...