Skip to content
Advertisement

Webflux collectMap resulting Mono<Map<String, Mono>>

I’m quite new in the reactive world

My code looks like this:

JavaScript

The result is of type Map<String, Mono<String>> . I would like it to be of type Map<String, String>. Any ideas?

Advertisement

Answer

I suggest to use flatMap operator before collecting the elements into a Map

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement