I had some problem while migrating from Spring boot 1.3.x to 1.5, I got it working after updating entity package at EntityManagerFactory bean
@Bean(name="entityManagerFactoryDef")
@Primary
public LocalContainerEntityManagerFactoryBean defaultEntityManager() {
Map map = new HashMap();
map.put("hibernate.default_schema", env.getProperty("spring.datasource.username"));
map.put("hibernate.hbm2ddl.auto", env.getProperty("spring.jpa.hibernate.ddl-auto"));
LocalContainerEntityManagerFactoryBean em = createEntityManagerFactoryBuilder(jpaVendorProperties())
.dataSource(primaryDataSource()).persistenceUnit("default").properties(map).build();
em.setPackagesToScan("com.simple.entity");
em.afterPropertiesSet();
return em;
}
This bean referred in Application class as below
@SpringBootApplication
@EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactoryDef")
public class SimpleApp {
}