“Spring Boot 文件大小上传限制”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
第1行: 第1行:
<syntaxhighlight lang="yaml">
+
https://docs.spring.io/spring-boot/docs/2.7.8/reference/html/application-properties.html#application-properties.web.spring.servlet.multipart.max-file-size<syntaxhighlight lang="yaml">
 
spring:
 
spring:
 
   servlet:
 
   servlet:
第5行: 第5行:
 
       max-file-size: 10MB
 
       max-file-size: 10MB
 
       max-request-size: 10MB
 
       max-request-size: 10MB
</syntaxhighlight>org.springframework.boot.autoconfigure.web.servlet.MultipartProperties.java
+
</syntaxhighlight>org.springframework.boot.autoconfigure.web.servlet.MultipartProperties.java来自 spring-boot-autoconfigure-x.x.x.RELEASE.jar
  
 +
max-file-size:最大文件大小,默认1MB
  
来自 spring-boot-autoconfigure-x.x.x.RELEASE.jar
+
Max request size:最大请求大小,默认10MB

2023年2月2日 (四) 09:40的版本

https://docs.spring.io/spring-boot/docs/2.7.8/reference/html/application-properties.html#application-properties.web.spring.servlet.multipart.max-file-size

spring:
  servlet:
    multipart:
      max-file-size: 10MB
      max-request-size: 10MB

org.springframework.boot.autoconfigure.web.servlet.MultipartProperties.java来自 spring-boot-autoconfigure-x.x.x.RELEASE.jar

max-file-size:最大文件大小,默认1MB

Max request size:最大请求大小,默认10MB