首页 > 其他分享 >SpringBoot 上传文件报错org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The fie

SpringBoot 上传文件报错org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The fie

时间:2022-10-31 00:44:37浏览次数:56  
标签:fileupload its 报错 file 上传 permitted size

 

 

org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The field file exceeds its maximum permitted size of 1048576 bytes. 由报错信息可以得知上传文件大小超过SpringBoot默认的配置,修改application.propperties配置文件或者添加文件上传配置类 如果两个都配置了,亲测还是配置类的值有效

1.修改application.propperties配置文件

2.添加文件上传配置类

 

标签:fileupload,its,报错,file,上传,permitted,size
From: https://www.cnblogs.com/azell/p/16842877.html

相关文章