I want to limit the full rest request size (including headers/body etc.). Is their a way to do that via configuration or via code?
I've tried the follwoing but it doesn't work.
spring.servlet.multipart.max-request-size=1MB
spring.servlet.multipart.enabled=true
Just use this config in src/main/resources/application.properties
spring.servlet.multipart.max-file-size=1024KB
spring.servlet.multipart.max-request-size=1024KB
You can check this on the default documentation https://spring.io/guides/gs/uploading-files/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.