I\'m having the following simplified handler function (Spring WebFlux and the functional API using Kotlin). However, I need a hint how to detect an empty Flux and then use n
Use Flux.hasElements() : Mono function:
Flux.hasElements() : Mono
return customerFlux.hasElements() .flatMap { if (it) ok().body(customerFlux) else noContent().build() }