【发布时间】:2019-02-03 13:57:22
【问题描述】:
我正面临一个非常奇怪的行为。我正在将我的 jar 打包到一个容器中以将其部署在 ECS 上,但是,在将 max-file-size 定义为 时,我的 application.yaml 似乎没有生效100M。
奇怪的是,无论是在本地启动应用程序还是通过执行 fat jar,它都能正常工作。
这是我的 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"]
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"
}
【问题讨论】:
-
可以分享jar吗?
标签: amazon-web-services spring-boot amazon-ecs