title: Spring boot 2.1.0 error when trying to bootstrap Hibernate asynchronously
body: <p>I'm upgrading my application to Spring 2.1.0 and one of the new things I was trying to use is Hibernate asynchronously bootstrap.</p>
  
  <p>But when I'm adding a flag <code>spring.data.jpa.repositories.bootstrap-mode=deferred</code> to configuration then application throws error during startup:</p>
  
  <blockquote>
    <p>Parameter 0 of method entityManagerFactory in
    org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration
    required a single bean, but 2 were found:
    - [ ]     - applicationTaskExecutor: defined by method 'applicationTaskExecutor' in class path resource
    [org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.class]
      - taskScheduler: defined by method 'taskScheduler' in class path resource
    [org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.class]</p>
  </blockquote>
  
  <p>Looks like Spring have trouble with finding unique <code>AsyncTaskExecutor</code> bean but both beans are coming from auto configuration.
  To make it work I excluded <code>TaskExecutionAutoConfiguration</code> because right now I'm not using it but I don't really like this approach:</p>
  
  <pre><code>@SpringBootApplication(exclude = {TaskExecutionAutoConfiguration.class})
  @EnableScheduling
  class MyApp {}
  </code></pre>
  
  <p>Any ideas how to fix it properly? Seems to me like a bug in spring boot.</p>