title: Kotlin coroutines and Spring Framework 5 reactive types
body: <p>Kotlin coroutines allow to execute non-blocking code by returning <code>Deferred</code> value. This is really useful to make non-blocking code while using blocking methods (from a library for example).</p>
  
  <p>Spring 5 allows to use <code>Mono</code> and <code>Flux</code> into the framework. The big interest that I see is the ability to <em>serialize</em> instances of these two types and send it back as response when someone call a controller endpoint.</p>
  
  <p>One of the big point of Spring 5 is to have an specific support for Kotlin (router, bean declaration, ...), but I cannot find informations about the possible interactions between Kotlin coroutines and Spring 5 reactive types.</p>
  
  <p>Is there any way to combine the advantages of these features?</p>
  
  <ul>
  <li>converting <code>Deferred</code> into <code>Mono</code>/<code>Flux</code>?</li>
  <li>having a <code>Deferred</code> as response type of Spring controller methods ?</li>
  </ul>
  
  <p>If no, in which cases do coroutine make sense if we have Spring 5 reactive types?</p>