Introduce ServerResponse Kotlin extensions
Issue: SPR-15293
This commit is contained in:
parent
710702acdc
commit
40ae8d41a4
|
|
@ -0,0 +1,11 @@
|
|||
package org.springframework.web.reactive.function.server
|
||||
|
||||
import org.reactivestreams.Publisher
|
||||
|
||||
/**
|
||||
* Extension for [ServerResponse.BodyBuilder.body] providing a `body(Publisher<T>)` variant.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
inline fun <reified T : Any> ServerResponse.BodyBuilder.body(publisher: Publisher<T>) = body(publisher, T::class.java)
|
||||
Loading…
Reference in New Issue