发送文件时,我收到一个字节数组。我总是遇到 webflux 接收数组的问题。抛出的错误如下:
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
你现在如何在 webflux 中解决这个问题?
原文由 taveced 发布,翻译遵循 CC BY-SA 4.0 许可协议
这对我有用:
@Bean
在你的配置类之一或主要SpringBootApplication
类:WebClient
的所需课程: