WebFlux functional: How to detect an empty Flux and return 404?

前端 未结 4 1576
灰色年华
灰色年华 2020-12-30 10:03

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

4条回答
  •  我在风中等你
    2020-12-30 10:59

    I'm not sure why no one is talking about using the hasElements() function of Flux.java which would return a Mono.

提交回复
热议问题