I am facing a very strange behavior. I am packing up my jar into a container to deploy it on ECS, however, it seems like my application.yaml is not taking effect when it comes to define the max-file-size to 100M.
oddly it works just fine when launch the application either locally or by executing the fat jar.
Here's my application.yaml
spring:
http.multipart:
max-file-size: 100MB
max-request-size: 100MB
Dockerfile
FROM openjdk:8-jre-alpine
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=prod","-jar","/app.jar"]
The error on AWS
{
"timestamp": 1535489967123,
"status": 500,
"error": "Internal Server Error",
"exception": "org.springframework.web.multipart.MultipartException",
"message": "Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (43258070) exceeds the configured maximum (10485760)",
"path": "/fake/path/loader"
}