mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 22:59:03 +00:00
Introduce ServerResponse Kotlin extensions
Issue: SPR-15293
This commit is contained in:
+11
@@ -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)
|
||||
Reference in New Issue
Block a user