We are using Spring in Version 2.7.2. Once we enable WebFlux via the @EnableWebFlux annotation the configuration property spring.codec.max-in-memory-size is not being honored.
We have a Controller that receives a payload that is bigger than the default 256kb. It fails with Exceeded limit on max bytes to buffer : 262144
If we are disabling WebFlux than the limit is being honored and I can receive a bigger payload.
We've created a bug repository for easier reproduction: https://github.com/Mowee/webflux-max-in-memory-bug There is also a Test that you can use to reproduce this.: https://github.com/Mowee/webflux-max-in-memory-bug/blob/main/src/test/kotlin/com/example/demo/DemoControllerTest.kt#L16
Comment From: wilkinsona
This is working as designed. @EnableWebFlux disables Spring Boot's auto-configuration of WebFlux, allowing you to take complete control of its configuration.
Comment From: Mowee
Okay that explains it. The name of the annotation sort of was misleading for us 🙈
Thanks for pointing me in the right direction 👍