Erik Dreyer
08/25/2021, 3:04 PM@PostMapping(path = ["/foo"])
suspend fun example(): Flow<String> {
val flux: Flux<String> = service.returnsFlux()
return flux // <-- how to convert to Flow?
}
(this is a trivial example, but I have an API that returns a FLux<T>
)
I’m trying to figure out how to go from a Mono/Flux
back to the kotlin coroutines approach for Spring Webflux.
I’d appreciate any help .Ivan Pavlov
08/25/2021, 3:15 PMErik Dreyer
08/25/2021, 3:29 PMMono
, is it still appropriate to call mono.asFlow()
or is there a better way to handle Mono’s?Ivan Pavlov
08/25/2021, 3:31 PM