转载

Spring Boot修改最大上传文件限制:The field file exceeds its maximum permitted size of 1048576 bytes.

转载https://blog.csdn.net/awmw74520/article/details/70230591
自己遇到了,感觉总结的不错,所以自己也总结下
application.properties 中配置
Spring Boot 1.3.x或者之前

multipart.maxFileSize=100Mb
multipart.maxRequestSize=1000Mb

Spring Boot 1.4.x

spring.http.multipart.maxFileSize=100Mb
spring.http.multipart.maxRequestSize=1000Mb

Spring Boot 2.0之后

spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB
正文到此结束
本文目录