As initially raised in #32652, ServerResponse.BodyBuilder#bodyValue
should allow to specify the generic type to use for serialization in Kotlin, but also in Java. So this issue is going to introduce:
- BodyInserters.fromValue(T, ParameterizedTypeReference<T>)
- Related Java APIs in WebClient.RequestBodySpec
and ServerResponse.BodyBuilder
- Related Kotlin extensions bodyValueWithType<T>(body)
and bodyValueWithTypeAndAwait<T>(body)