org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The field file exceeds its maximum permitted size of 1048576 bytes

翻译过来的大致意思就是文件大小超了

解决办法:

在application.properties中添加如下:
#单个文件最大大小
spring.http.multipart.maxFileSize=20Mb
#所有上传文件最大大小
spring.http.multipart.maxRequestSize=1000Mb

发表评论

邮箱地址不会被公开。 必填项已用*标注