use of org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder in project spring-boot by spring-projects.
the class JpaBaseConfiguration method entityManagerFactoryBuilder.
@Bean
@ConditionalOnMissingBean
public EntityManagerFactoryBuilder entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter, ObjectProvider<PersistenceUnitManager> persistenceUnitManager) {
EntityManagerFactoryBuilder builder = new EntityManagerFactoryBuilder(jpaVendorAdapter, this.properties.getProperties(), persistenceUnitManager.getIfAvailable());
builder.setCallback(getVendorCallback());
return builder;
}
use of org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder in project spring-boot by spring-projects.
the class JpaBaseConfiguration method entityManagerFactoryBuilder.
@Bean
@ConditionalOnMissingBean
public EntityManagerFactoryBuilder entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter, ObjectProvider<PersistenceUnitManager> persistenceUnitManager, ObjectProvider<EntityManagerFactoryBuilderCustomizer> customizers) {
EntityManagerFactoryBuilder builder = new EntityManagerFactoryBuilder(jpaVendorAdapter, this.properties.getProperties(), persistenceUnitManager.getIfAvailable());
customizers.orderedStream().forEach((customizer) -> customizer.customize(builder));
return builder;
}
Aggregations