SpringBoot项目上传文件报错:the request was rejected because its size (53030696) exceeds the configured maxim

借鉴博客:https://blog.csdn.net/qq_33243189/article/details/89631495

multipart的上传文件配置默认是10M大小


解决办法通过设置application.yml文件重新配置multipart的上传大小:

spring:
  servlet:
    multipart:
      enabled: true
      max-file-size: 200MB
      max-request-size: 200MB

 

然后就没报错了。































上一篇:day16 Linux三剑客之awk


下一篇:feign接口调用服务上传图片 报错 the request was rejected because no multipart boundary was found