title: Does the executor specified by @Async work for CompletableFuture.supplyAsync(supplier)?
body: <p>I have an executor,</p>
  
  <pre><code>@Bean("someExecutor")
  public Executor someExecutor() {
      ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
      executor.setCorePoolSize(2);
      executor.setMaxPoolSize(2);
      executor.setQueueCapacity(500);
      executor.setThreadNamePrefix("AsyncMethod-");
      executor.initialize();
      return executor;
  }
  </code></pre>
  
  <p>and a async method.</p>
  
  <pre><code>@Async("someExecutor")
  public Future&lt;List&lt;String&gt;&gt; someMethod(){
      return CompletableFuture.supplyAsync(() -&gt; {
          //long time job
          return listGeneratedByLongTimeJob;
      });
  }
  </code></pre>
  
  <p>Will Spring use the someExecutor for someMethod? And how?</p>
  
  <p>I know an overloading method for supplyAsync(supplier) is supplyAsync(supplier, executor), how about the following code?</p>
  
  <pre><code>@Autowired("someExecutor")
  private Executor executor;
  
  @Async()
  public Future&lt;List&lt;String&gt;&gt; someMethod(){
      return CompletableFuture.supplyAsync(() -&gt; {
          //long time job
          return listGeneratedByLongTimeJob;
      }, executor);
  }
  </code></pre>
  
  <p>Thanks.</p>