title: use of CompletableFuture.supplyAsync and CompletableFuture.completedFuture within @Async annotation in spring boot
body: <p>I have the following methods:</p>
  <pre><code>@EnableAsync
  @Service
  Class MyService{ 
  
  private String processRequest() {
          log.info(&quot;Start processing request&quot;);
  
          try {
              Thread.sleep(5000);
          } catch (InterruptedException e) {
              throw new RuntimeException(e);
          }
  
          log.info(&quot;Completed processing request&quot;);
          return RESULT;
      }    
  
  @Async
  public CompletableFuture&lt;String&gt; getSupplyAsyncResult(){
      CompletableFuture&lt;String&gt; future
              = CompletableFuture.supplyAsync(this::processRequest);
      return future;
  }
  
  @Async
  public CompletableFuture&lt;String&gt; getCompletedFutureResult(){
      CompletableFuture&lt;String&gt; future
              = CompletableFuture.supplyAsync(this::processRequest);
      return future;
  }
  </code></pre>
  <p>and the following endpoints in controller:</p>
  <pre><code>   @RequestMapping(path = &quot;/asyncSupplyAsync&quot;, method = RequestMethod.GET)
      public CompletableFuture&lt;String&gt; getValueAsyncUsingCompletableFuture() {
          log.info(&quot;Request received&quot;);
          CompletableFuture&lt;String&gt; completableFuture
                  = myService.getSupplyAsyncResult();
          log.info(&quot;Servlet thread released&quot;);
          return completableFuture;
      }
  </code></pre>
  <p>and</p>
  <pre><code>   @RequestMapping(path = &quot;/asyncCompletable&quot;, method = RequestMethod.GET)
      public CompletableFuture&lt;String&gt; getValueAsyncUsingCompletableFuture() {
          log.info(&quot;Request received&quot;);
          CompletableFuture&lt;String&gt; completableFuture
                  = myService.getCompletedFutureResult();
          log.info(&quot;Servlet thread released&quot;);
          return completableFuture;
      }
  </code></pre>
  <p>Why would anyone use <strong>completableFuture.supplyAsync</strong> within @Async method in Spring endpoint?
  I assume using <strong>completableFuture.completedFuture</strong>  is more appropriate, please share your views.</p>