Use the following configuration to auto scan your hibernate entity beans.
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="resourcesDataSource" />
<property name="packagesToScan">
<list>
<value>my.packages.hibernate.domain</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
No comments:
Post a Comment