由于spring对hibernate配置文件hibernate.cfg.xml的集成相当好 mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
<property name="mappingDirectoryLocations">
<list>
<value>WEB-INF/HibernateMappings</value> </list> </property> 也可以通过classpath来指出 <property name="mappingDirectoryLocations"> <list> <value>classpath:/XXX/package/</value> </list> </property> 4. mappingJarLocations:指定加载的映射文件在jar文件中 |
mappingDirectoryLocations/mappingJarLocations/mappingResources/mappingLocations的区别
最新推荐文章于 2018-10-06 19:10:00 发布