问题:
对于spring-boot starter maven依赖为2.0以下时使用:
在application.properties/yml中配置以下属性
#单文件上传最大大小,默认1Mb
spring.http.multipart.maxFileSize=5Mb
#多文件上传时最大大小,默认10Mb
spring.http.multipart.maxRequestSize=30Mb
spring-boot starter maven依赖为2.0及以上时,属性变更为:
spring.servlet.multipart.max-file-size=5Mb
spring.servlet.multipart.max-request-size=30Mb