In a Spring Hibernate XML configuration, I have
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
// ...
<property name="annotatedClasses">
<list>
<value>com.abc.xyz.Foo</value>
// ...
</list>
</property>
<property name="hibernateProperties">
<props>
// ....
</props>
</property>
//..
</bean>
I know an equivalent of a Spring Java configuration is the following: LocalSessionFactoryBuilder(dataSource()).addAnnotatedClasses(Foo.class).buildSessionFactory();
My question is how to do the same if I don't use the LocalSessionFactoryBuilder class, but HibernateJpaVendorAdapter and LocalContainerEntityManagerFactoryBean classes?