title: Spring Boot 2.1 EntityManagerFactory Bean could not be found
body: <p>I have simple Spring Boot project with JPA, Web and PostgreSQL. I'm using the latest Spring Boot version <strong>2.1.3.RELEASE</strong>.</p>
  
  <p>After adding simple JpaRepository application fails on startup with the following error:</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Field dataMappingRepository in com.my.example.service.impl.SimpleServiceImpl required a bean named 'entityManagerFactory' that could not be found.
  
  The injection point has the following annotations:
      - @org.springframework.beans.factory.annotation.Autowired(required=true)
  
  
  Action:
  
  Consider defining a bean named 'entityManagerFactory' in your configuration.
  </code></pre>
  
  <p>I have a simple @Service class like:</p>
  
  <pre><code>public class SimpleServiceImpl implements SimpleService {
    @Autowired private SimpleJpaRepository repo;
  }
  </code></pre>
  
  <p>And JpaRepository:</p>
  
  <pre><code>public interface SimpleJpaRepository extends JpaRepository&lt;SimpleEntity, Long&gt; {}
  </code></pre>
  
  <p>And here is my application.yml:</p>
  
  <pre><code>spring:
     datasource:
        url: jdbc:postgresql://localhost:5432/simple
        username: user
        password: pass
        driver-class-name: org.postgresql.Driver
     jpa:
        show-sql: false
        properties:
           hibernate:
              dialect: org.hibernate.dialect.PostgreSQLDialect
        hibernate:
           ddl-auto: validate
  </code></pre>
  
  <p>If I change <strong>spring-boot-starter-parent</strong> to <strong>2.0.8.RELEASE</strong> the application starts correctly.</p>