Many of Spring Reactor's APIs are not written in Kotlin


When I was writing Spring Reactor with Kotlin, many APIs did not know how to write it.

for example:


Flux.just(“a”, “b”)
.zipWith(Flux.just(“c”, “d”), (s1, s2) -> String.format("%s-%s", s1, s2))


And what is your question?


I suppose the question is about the lack of examples in Kotlin.
That is actually easy to solve – just paste the Java example in Kotlin code and IDEA will propose to convert it to Kotlin automatically.


The API for Java and Kotlin is basically the same. The main difference it the syntax for lambda expressions. And there are some Kotlin specific factory functions to create a Flux or Mono in the form of extension functions. This is described in the Reactor Reference.