use of org.springframework.orm.hibernate5.LocalSessionFactoryBean in project tutorials by eugenp.
the class Cause1PersistenceConfig method sessionFactory.
@Bean
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource());
sessionFactory.setPackagesToScan(new String[] { "org.baeldung.ex.mappingexception.cause1.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
}
use of org.springframework.orm.hibernate5.LocalSessionFactoryBean in project tutorials by eugenp.
the class Cause2PersistenceConfig method sessionFactory.
@Bean
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource());
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
}
use of org.springframework.orm.hibernate5.LocalSessionFactoryBean in project tutorials by eugenp.
the class Cause1NonTransientConfig method sessionFactory.
@Bean
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource());
sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
}
use of org.springframework.orm.hibernate5.LocalSessionFactoryBean in project tutorials by eugenp.
the class Cause4NonTransientConfig method sessionFactory.
@Bean
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource());
sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
}
use of org.springframework.orm.hibernate5.LocalSessionFactoryBean in project tutorials by eugenp.
the class PersistenceConfig method sessionFactory.
@Bean
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource());
sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
}
Aggregations