Package sk.iway.iwcm.system.spring
Class BaseJpaDBConfig
java.lang.Object
sk.iway.iwcm.system.spring.BaseJpaDBConfig
Base class for Spring DATA config, you need to extend this class and override entityManagerFactory() and transactionManager() methods
http://docs.webjetcms.sk/latest/en/custom-apps/spring-config/
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
In your implementation you need to override this method and annotate it with @Bean("basecmsEntityManager")org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
getEntityManager
(String datasource, String[] packagesToScan) Base class to setup JPA EntityManagerorg.springframework.transaction.PlatformTransactionManager
In your implementation you need to override this method and annotate it with @Bean("basecmsTransactionManager")
-
Constructor Details
-
BaseJpaDBConfig
public BaseJpaDBConfig()
-
-
Method Details
-
transactionManager
public org.springframework.transaction.PlatformTransactionManager transactionManager()In your implementation you need to override this method and annotate it with @Bean("basecmsTransactionManager")- Returns:
-
entityManagerFactory
public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory()In your implementation you need to override this method and annotate it with @Bean("basecmsEntityManager")- Returns:
-
getEntityManager
public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean getEntityManager(String datasource, String[] packagesToScan) Base class to setup JPA EntityManager- Parameters:
datasource
-packagesToScan
-- Returns:
-