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 Object
The ApplicationJpaConfiguration class initialises the JPA EntityManagerFactory for the
application.
- Author:
- Marcus Portmann
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeanapplicationEntityManagerFactory(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager platformTransactionManager) Returns the application entity manager factory bean associated with the application data source.Returns the names of the packages to scan for JPA entity classes.
-
Method Details
-
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
-
packagesToScanForEntities
Returns the names of the packages to scan for JPA entity classes.- Returns:
- the names of the packages to scan for JPA entity classes
-