SpringBoot之文件上传体积过大问题(解决方案)

前端之家收集整理的这篇文章主要介绍了SpringBoot之文件上传体积过大问题(解决方案)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

错误信息如下(关键):@H_404_1@

org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: 
the request was rejected because its size (110862330) exceeds the configured maximum (31457280)

解决方案(主要是修改application.yml对应的配置):
如果觉得300MB不够的话,可以往上调。@H_404_1@

@H_404_16@spring:
  http:
    multipart:
      enabled: true@H_404_16@
      max-file-@H_404_16@size: 300MB 
      max-request-size: 300MB

 @H_404_1@

猜你在找的Springboot相关文章