在过去使用 Spring 整合 Hibernate 的时候,都是用这样的配置方式。
1 2 3 4 5 6 7 8 9 10 |
<bean id ="sessionFactory" lazy-init ="true" class ="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name ="mappingResources"> <list> <value>resources/icustomer/Contact.hbm.xml</value> <value>resources/icustomer/Customer.hbm.xml</value> </list> </property> ................... </bean> |