spring-framework / org.springframework.orm.hibernate5.support / HibernateDaoSupport / getHibernateTemplate

getHibernateTemplate

@Nullable fun getHibernateTemplate(): HibernateTemplate

Return the HibernateTemplate for this DAO, pre-initialized with the SessionFactory or set explicitly.

Note: The returned HibernateTemplate is a shared instance. You may introspect its configuration, but not modify the configuration (other than from within an #initDao implementation). Consider creating a custom HibernateTemplate instance via new HibernateTemplate(getSessionFactory()), in which case you're allowed to customize the settings on the resulting instance.