use of org.springframework.orm.hibernate5.HibernateTransactionManager in project dhis2-core by dhis2.
the class HibernateConfig method hibernateTransactionManager.
@Bean
public HibernateTransactionManager hibernateTransactionManager(DataSource dataSource, SessionFactory sessionFactory) {
HibernateTransactionManager transactionManager = new HibernateTransactionManager();
transactionManager.setSessionFactory(sessionFactory);
transactionManager.setDataSource(dataSource);
return transactionManager;
}
Aggregations