@Configuration(proxyBeanMethods=false) @EnableConfigurationProperties(value=JpaProperties.class) @Import(value=org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.Registrar.class) public abstract class JpaBaseConfiguration extends Object implements BeanFactoryAware
Auto-configuration
for JPA.Modifier and Type | Class and Description |
---|---|
protected static class |
JpaBaseConfiguration.JpaWebConfiguration |
Modifier | Constructor and Description |
---|---|
protected |
JpaBaseConfiguration(DataSource dataSource,
JpaProperties properties,
ObjectProvider<JtaTransactionManager> jtaTransactionManager) |
protected JpaBaseConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager)
@Bean @ConditionalOnMissingBean(value=org.springframework.transaction.TransactionManager.class) public PlatformTransactionManager transactionManager(ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers)
@Bean @ConditionalOnMissingBean public JpaVendorAdapter jpaVendorAdapter()
@Bean @ConditionalOnMissingBean public EntityManagerFactoryBuilder entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter, ObjectProvider<PersistenceUnitManager> persistenceUnitManager, ObjectProvider<EntityManagerFactoryBuilderCustomizer> customizers)
@Bean @Primary @ConditionalOnMissingBean(value={org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.class,javax.persistence.EntityManagerFactory.class}) public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder)
protected abstract AbstractJpaVendorAdapter createJpaVendorAdapter()
protected void customizeVendorProperties(Map<String,Object> vendorProperties)
vendorProperties
- the vendor properties to customizeprotected String[] getPackagesToScan()
protected JtaTransactionManager getJtaTransactionManager()
null
protected final boolean isJta()
PlatformTransactionManager
is being used.protected final JpaProperties getProperties()
JpaProperties
.protected final DataSource getDataSource()
DataSource
.public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException