【问题标题】:Apache Camel with Spring Boot 413 Request Entity Too Large带有 Spring Boot 413 请求实体的 Apache Camel 太大
【发布时间】:2019-08-06 06:43:17
【问题描述】:
我在 Spring Boot 中使用 Apache Camel,当我想发送一个 25MB 大小的文件时,我收到错误 413 Request Entity Too Large。
我试过set,但还是不行。
spring.servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB
我使用骆驼弹簧靴 2.23.1
【问题讨论】:
标签:
java
spring-boot
apache-camel
【解决方案1】:
我需要将此添加到 restConfiguration()
restConfiguration()
.componentProperty("chunkedMaxContentLength", String.valueOf(50 * 1024 * 1024))
.endpointProperty("chunkedMaxContentLength", String.valueOf(50 * 1024 * 1024))
.consumerProperty("chunkedMaxContentLength", String.valueOf(50 * 1024 * 1024))