title: Spring reactor join 2 Mono
body: <p>I need to connect to database in reactive way using spring reactor.
  Here is scenario which I would like to get-></p>
  
  <ol>
  <li><p>1.Connect to db and get response1</p>
  
  <p>2.Then Connect to db and get response2 while providing response1.parameter</p>
  
  <ol start="3">
  <li>Join those two into single response and send back to the user as String</li>
  </ol></li>
  </ol>
  
  <p>Since all objects are unique I planned to use Mono</p>
  
  <pre><code>Mono&lt;Response1&gt; r1 = qrepo.findByID(id)
  Mono&lt;Response2&gt; r2 = qrepo.findByID(r1.getParam())
  
  Mono&lt;String&gt; combined = Mono.when(r1, r2).map(t -&gt; { 
              StringBuffer sb = new StringBuffer();
                  sb.append(r1.getProp1());
                  sb.append(r2.getProp2());
  </code></pre>
  
  <p>But this  doesn't wor for me</p>