@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 |
Constructor and Description |
---|
JpaBaseConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected abstract AbstractJpaVendorAdapter |
createJpaVendorAdapter() |
protected void |
customizeVendorProperties(Map<String,Object> vendorProperties)
Customize vendor properties before they are used.
|
LocalContainerEntityManagerFactoryBean |
entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder) |
EntityManagerFactoryBuilder |
entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter) |
protected JtaTransactionManager |
getJtaTransactionManager() |
protected String[] |
getPackagesToScan() |
protected EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback |
getVendorCallback() |
protected abstract Map<String,Object> |
getVendorProperties() |
protected boolean |
isJta()
Returns if a JTA
PlatformTransactionManager is being used. |
JpaVendorAdapter |
jpaVendorAdapter() |
void |
setBeanFactory(BeanFactory beanFactory) |
PlatformTransactionManager |
transactionManager() |
@Bean @ConditionalOnMissingBean(value=org.springframework.transaction.PlatformTransactionManager.class) public PlatformTransactionManager transactionManager()
@Bean @ConditionalOnMissingBean public JpaVendorAdapter jpaVendorAdapter()
@Bean @ConditionalOnMissingBean public EntityManagerFactoryBuilder entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter)
@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 EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback getVendorCallback()
protected String[] getPackagesToScan()
protected JtaTransactionManager getJtaTransactionManager()
null
protected final boolean isJta()
PlatformTransactionManager
is being used.public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.