We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 710702a commit 40ae8d4Copy full SHA for 40ae8d4
spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerResponseExtensions.kt
@@ -0,0 +1,11 @@
1
+package org.springframework.web.reactive.function.server
2
+
3
+import org.reactivestreams.Publisher
4
5
+/**
6
+ * Extension for [ServerResponse.BodyBuilder.body] providing a `body(Publisher<T>)` variant.
7
+ *
8
+ * @author Sebastien Deleuze
9
+ * @since 5.0
10
+ */
11
+inline fun <reified T : Any> ServerResponse.BodyBuilder.body(publisher: Publisher<T>) = body(publisher, T::class.java)
0 commit comments