I currently scan packages for DAOs and services using Spring 3.1 & Hibernate 4 via <context:component-scan>
Is there a way to do the same for classes marked @Entity
instead of using the configLocation
property and a hbm.xml
file?
<hibernate-configuration>
<session-factory>
<mapping class="com.example.model.User" />
<!-- etc. -->
</session-factory>
</hibernate-configuration>