spring boot 2.X上传文件限制大小

Spring Boot 1.3.x 

  • multipart.maxFileSize
  • multipart.maxRequestSize

Spring Boot 1.4.x and 1.5.x

  • spring.http.multipart.maxFileSize
  • spring.http.multipart.maxRequestSize

Spring Boot 2.x

  • spring.servlet.multipart.maxFileSize
  • spring.servlet.multipart.maxRequestSize

下面是2.x的示例

# Single file max size
spring:
  servlet:
    multipart:
      max-file-size: 10MB
      max-request-size: 100MB

 

posted @ 2018-09-17 16:24  LTmei  阅读(4383)  评论(0编辑  收藏  举报