DataBufferLimitException: Exceeded limit on max bytes to buffer webflux error

WebFlux 使用字节数组 byte[] 接收上传的文件时异常:

org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
    at org.springframework.core.io.buffer.LimitedDataBufferList.raiseLimitException(LimitedDataBufferList.java:101)
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException

有人遇到过没?

我在 application.yaml 中添加了 spring.codec.max-in-memory-size 配置,好像也没用。

spring:
  codec:
    max-in-memory-size: 10MB