I am developing an application utilizing JHipster. I have added the following to my application-dev.yml file:
spring:
profiles:
active: dev
multipart:
maxFileSize: -1
But I am still getting an error when I try to try to upload a file > 1MB:
Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (20663006) exceeds the configured maximum (10485760)
What am I missing? It seems this should be pretty straight forward.
Update 1
I un-nested it from spring
config as suggested by Andy, but still got the error. Updated yml file:
server:
port: 8080
multipart:
maxFileSize: -1
spring:
profiles:
active: dev
datasource: ...
Update 2
Ran into this issue again on newer version of Sprint Boot and had to change to this:
spring:
http:
multipart:
max-file-size: 30MB
max-request-size: 30MB
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…