1、springboot 2.1.0 上傳檔案太多報錯
Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http. fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (216185201) exceeds the configured maximum (104857600)
2、處理方案:
1 .查看Nginx 能否有限制請求資料大小
server {
listen 80;
1 500M;
#charset koi8-r;
#access_log logs/host.access.log main;lo /test/testproxy_pass http://127.0.0.1:8080/test/;
}
#}
#其中: client_max_body_size 500
}#其中: client_max_body_size 500M;#3.查看tomcat能否有限制請求資料大小在D:\Program Files\Apache Software Foundation\Tomcat 8.5\conf\server.xml
#redirectPort="8443" />
maxPostSize 設置請求大小,-1代表不限制
4.springboot 設定請求大小限制
在application.properties設定:
spring.servlet.multipart.max-file-size=500MB
#spring.servlet.multipart.max-request-size=500MB以上是springboot上傳檔案太大報錯怎麼解決的詳細內容。更多資訊請關注PHP中文網其他相關文章!