<bean id="sessionFactory_DB2"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource_DB2" />
<property name="packagesToScan"><!-- 配置在类中配置HIBERNATE信息的类批量加载 -->
<list>
<value>cn.net.withub/**/model</value>
</list>
</property>
<property name="mappingLocations"><!-- 配置传统的HRM文件批量加载 -->
<list>
<value>
classpath*:/cn/net/withub/other/orm/*.hbm.xml
</value>
</list>
</property>
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource_DB2" />
<property name="packagesToScan"><!-- 配置在类中配置HIBERNATE信息的类批量加载 -->
<list>
<value>cn.net.withub/**/model</value>
</list>
</property>
<property name="mappingLocations"><!-- 配置传统的HRM文件批量加载 -->
<list>
<value>
classpath*:/cn/net/withub/other/orm/*.hbm.xml
</value>
</list>
</property>