inline fun <reified T : Any> BodyBuilder.bodyWithType(producer: Any): Mono<ServerResponse>
Extension for ServerResponse.BodyBuilder.body providing a bodyWithType<T>(Any)
variant
leveraging Kotlin reified type parameters. This extension is not subject to type
erasure and retains actual generic type arguments.
producer
- the producer to write to the response. This must be a
Publisher or another producer adaptable to a
Publisher via org.springframework.core.ReactiveAdapterRegistry
Parameters
Author
Sebastien Deleuze
Since
5.2
inline fun <reified T : Any> BodyBuilder.bodyWithType(publisher: Publisher<T>): Mono<ServerResponse>
Extension for ServerResponse.BodyBuilder.body providing a bodyWithType(Publisher<T>)
variant
leveraging Kotlin reified type parameters. This extension is not subject to type
erasure and retains actual generic type arguments.
publisher
- the Publisher to write to the response
Parameters
Author
Sebastien Deleuze
Since
5.2