spring配置文件中配置sessionFactory时,属性configLocations的作用(spring整合hibernate)
例:
<bean name="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><!-- 使用hibernate.cfg.xml配置文件 --><property name="configLocations"><value>classpath:hibernate.cfg.xml</value></property>....</bean>
其中属性configLocations表示去哪里找hibernate的配置文件hibernate.cfg.xml,如果没有这个属性,hibernate.cfg.xml会被忽视掉

浙公网安备 33010602011771号