I'm testing Spring Boot 4.0.0-RC1 (webflux) and I ...
# spring
r
I'm testing Spring Boot 4.0.0-RC1 (webflux) and I have problems with basic
ServerRequest.awaitBody<T>()
. It does return an object with correct type but empty (no request data is deserialized). What am I missing?
When calling
awaitBody<String>()
instead, I see the content is read correctly (it's the correct json data). I also see the jackson codec is used to deserialize data, even though I have kotlinx.serialization in dependencies and no direct jackson dependency (but I'm not sure if it is related to my problem).
It seems related. I've managed to exclude
jackson-databind
dependency and my application started to work correctly (I assume with
kotlinx.serialization
instead of jackson)
Unfortunately I can't reproduce the issue in a simple project 😞
But I think I have found the cause. There is no
tools.jackson.module:jackson-module-kotlin
dependency by default in Spring Boot 4. Adding the dependency manually fixes my problem.
👍 4