当前位置: 代码迷 >> 综合 >> springboot 上传文件设置文件大小限制
  详细解决方案

springboot 上传文件设置文件大小限制

热度:70   发布时间:2024-01-28 01:59:17.0

 报错内容:

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 (39353107) exceeds the configured maximum (10485760)

 

 

解决方案:

 

spring:servlet:multipart:max-request-size: 100MBmax-file-size: 100MB