Wow Marten, now you got me confused here.
The book I'm following (Manning: "Spring in Action", 2nd Ed) uses the annotated model classes as the entities to be used in the XML configuration for sessionFactory (in applicationContext.xml). The exact code provided by the book for this configuration is:
As said in the book just after presenting this code:
<property name="dataSource" ref="dataSource" />
"However, instead of configuring one or more mapping files, we must configure AnnotationSessionFactoryBean with one or more classes that are annotated for persistence with Hibernate. Here we’ve listed the domain objects in the RoadRantz application."
As you can see, I adjusted the code with my own domain objects (POJO classes annotated for Hibernate persistence) and, as I already had a Hibernate configuration file, I replaced the "hibernateProperties" property with a reference to my hibernate.cfg.xml file previously created by NetBeans.
Once again, my applicationContext.xml using the annotatedClasses property for sessioNFactory configuration is at this link.
The book configures the Hibernate-backed DAO beans with the code
and, as you can see in my first post, I adjusted my XML accordingly.
<bean id="rantDao" class="com.roadrantz.dao.hibernate.HibernateRantDao">
<property name="sessionFactory" ref="sessionFactory" />
Reading your last comment, I'm afraid I couldn't abstract the difference you see between "entity" and "class". In my point of view, an "entity" is a model class correctly annotated for persistence. Am I missing something here?