在看Spring的时候,关于一些Hibernate配置不明白。
我使用Spring + Struts + Hibernate,在配置的地方,有一些费解.谢谢
1.sessionFactory这个Bean是有什么用的.
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingResources">
//2.这里不明白的地方.<list里面的value有什么用啊>
<list>
<value>net/smarthings/model/Role.hbm.xml</value>
<value>net/smarthings/model/User.hbm.xml</value>
<value>net/smarthings/model/UserCookie.hbm.xml</value>
<value>net/smarthings/model/Person.hbm.xml</value>
<value>net/smarthings/model/People.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
//3.这里不明白的地方.<props 里面的prop 有什么用啊>
<props>
<prop key="hibernate.dialect">@HIBERNATE-DIALECT@</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop> -->
<prop key="hibernate.jdbc.batch_size">0</prop> -->
</props>
</property>
</bean>