title: how to turn rest controller in async controller?
body: <p>we have in our project a endpoint that returns in 30 seconds avg,
  for this reason, we suggest turn this endpoint in async</p>
  <p>but, the services is not working anymore when using</p>
  <pre><code>@PostMapping(&quot;/alocacaoPorPeriodo&quot;)
  public void alocacaoPorPeriodo(@RequestParam(required = true) Date dataInicio, @RequestParam(required = true)  Date dataFim) {
      CompletableFuture.runAsync(() -&gt; alocacaoServive.alocarPorPeriodo(dataInicio, dataFim));
  }
  </code></pre>
  <p>The error happens when service call delete, save or update methods from jpa repository. Get methods is still working.</p>
  <pre><code>No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
  </code></pre>
  <p>this is the unique change that we have made to turn async, did I forget something?</p>
  <p>thx</p>