使用springboot 上传文件夹到报错 org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (44920632) exceeds the configured maximum (10485760)] with root cause

话不多说,直接上错误截图
the request was rejected because its size (44920632) exceeds the configured maximum (10485760)]
原因这时候是因为我们上传文件是超出了springboot默认上传文件的大小的

解决 这时候在你的applicatopn.properties 中配置一下 把默认大小限制给修改了就可以了
spring.http.multipart.max-file-size=50MB
spring.http.multipart.max-request-size=50MB

这个样子就解决了

相关文章:

  • 2021-08-31
  • 2021-09-26
  • 2021-09-15
  • 2021-12-09
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案