クラス JpaBaseConfiguration
java.lang.ObjectSE
org.springframework.boot.jpa.autoconfigure.JpaBaseConfiguration
@Configuration(proxyBeanMethods=false)
@EnableConfigurationProperties(JpaProperties.class)
public abstract class JpaBaseConfiguration
extends ObjectSE
JPA のベース
Auto-configuration。- 導入:
- 4.0.0
- 作成者:
- Phillip Webb, Dave Syer, Oliver Gierke, Andy Wilkinson, Kazuki Shimizu, Edd ú Mel é ndez, Yanming Zhou
ネストされたクラスの概要
ネストされたクラスコンストラクター概要
コンストラクター修飾子コンストラクター説明protectedJpaBaseConfiguration(DataSourceSE dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager) 方法の概要
修飾子と型メソッド説明protected abstract AbstractJpaVendorAdapterprotected voidcustomizeVendorProperties(MapSE<StringSE, ObjectSE> vendorProperties) ベンダープロパティを使用する前にカスタマイズします。entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder, PersistenceManagedTypes persistenceManagedTypes) entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter, ObjectProvider<PersistenceUnitManager> persistenceUnitManager, ObjectProvider<EntityManagerFactoryBuilderCustomizer> customizers) protected final DataSourceSEDataSourceSE を返します。protected @Nullable JtaTransactionManagerJTA トランザクションマネージャーを返します。protected final JpaPropertiesJpaPropertiesを返します。getVendorProperties(DataSourceSE dataSource) 指定されたDataSourceSE のベンダー固有のプロパティを返します。protected final booleanisJta()JTAPlatformTransactionManagerが使用されているかどうかを返します。transactionManager(ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers)
コンストラクターの詳細
JpaBaseConfiguration
protected JpaBaseConfiguration(DataSourceSE dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager)
メソッドの詳細
transactionManager
@Bean @ConditionalOnMissingBean(TransactionManager.class) public PlatformTransactionManager transactionManager(ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) jpaVendorAdapter
entityManagerFactoryBuilder
@Bean @ConditionalOnMissingBean public EntityManagerFactoryBuilder entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter, ObjectProvider<PersistenceUnitManager> persistenceUnitManager, ObjectProvider<EntityManagerFactoryBuilderCustomizer> customizers) entityManagerFactory
@Bean @Primary @ConditionalOnMissingBean({LocalContainerEntityManagerFactoryBean.class,EntityManagerFactoryEE.class}) public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder, PersistenceManagedTypes persistenceManagedTypes) createJpaVendorAdapter
getVendorProperties
指定されたDataSourceSE のベンダー固有のプロパティを返します。- パラメーター:
dataSource- データソース- 戻り値:
- ベンダーのプロパティ
customizeVendorProperties
getJtaTransactionManager
JTA トランザクションマネージャーを返します。- 戻り値:
- トランザクションマネージャーまたは
null
isJta
protected final boolean isJta()JTAPlatformTransactionManagerが使用されているかどうかを返します。- 戻り値:
- JTA トランザクションマネージャーが使用されている場合
getProperties
getDataSource