{@link org.springframework.beans.factory.FactoryBean} that creates aHibernate {@link org.hibernate.SessionFactory}. This is the usual way to set up a shared Hibernate SessionFactory in a Spring application context; the SessionFactory can then be passed to Hibernate-based DAOs via dependency injection.
NOTE: This variant of LocalSessionFactoryBean requires Hibernate 4.0 or higher. It is similar in role to the same-named class in the orm.hibernate3
package. However, in practice, it is closer to AnnotationSessionFactoryBean
since its core purpose is to bootstrap a SessionFactory
from annotation scanning.
@author Juergen Hoeller
@since 3.1
@see #setDataSource
@see #setPackagesToScan