SpringBoot,限制PUT请求的请求大小

时间:2015-07-30 01:21:59

标签: tomcat spring-boot spring-restcontroller

我正在使用嵌入式tomcat容器运行spring-boot服务。

有没有办法通过常见的应用程序属性或EmbeddedServletContainerFactory来限制HTTP PUT 请求的大小? 感谢

1 个答案:

答案 0 :(得分:1)

在application.properties文件中添加此属性。

spring.http.multipart.max-request-size=10MB

请参阅以下内容以获取更多信息:

https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

相关问题