Class ApplicationJpaConfiguration
- java.lang.Object
-
- africa.absa.inception.application.ApplicationJpaConfiguration
-
@Configuration @ConditionalOnClass(name={"org.springframework.orm.jpa.JpaVendorAdapter","org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean","org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter","org.springframework.transaction.PlatformTransactionManager"}) public class ApplicationJpaConfiguration extends ObjectThe ApplicationJpaConfiguration class initialises the JPA EntityManagerFactory for the application.- Author:
- Marcus Portmann
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeanapplicationEntityManagerFactory(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager platformTransactionManager)Returns the application entity manager factory bean associated with the application data source.protected List<String>packagesToScanForEntities()Returns the names of the packages to scan for JPA entity classes.
-
-
-
Method Detail
-
applicationEntityManagerFactory
@Bean @Primary @ConditionalOnBean(name="applicationDataSource", value=javax.sql.DataSource.class) public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean applicationEntityManagerFactory(@Qualifier("applicationDataSource") DataSource dataSource, org.springframework.transaction.PlatformTransactionManager platformTransactionManager)Returns the application entity manager factory bean associated with the application data source.- Parameters:
dataSource- the application data sourceplatformTransactionManager- the platform transaction manager- Returns:
- the application entity manager factory bean associated with the application data source
-
-