`

在Spring中将hibernate 的mapping分组配置

阅读更多

因项目需要,要将hibernate 的mapping分组配置,查看相关资料后实验成功:

xml 代码
  1. <!-- 此处为数据总线相关hbm文件映射 -->  
  2.     <property name="mappingResources">  
  3.         <list>  
  4.             <value>  
  5.                 com/enation/framework/groupware/User.hbm.xml   
  6.             </value>  
  7.             <value>  
  8.                 com/enation/framework/groupware/Group.hbm.xml   
  9.             </value>  
  10.             <value>  
  11.                 com/enation/framework/groupware/Dict.hbm.xml   
  12.             </value>                       
  13.         </list>  
  14.     </property>  
  15.   
  16.     <!-- 此处为组件相关hbm文件映射 -->  
  17.     <property name="configLocations">  
  18.         <list>  
  19.             <value>classpath:com/enation/groupware/product/test/enation_product.cfg.xml</value>  
  20.             <value>classpath:com/enation/groupware/infomation/test/enation_infomation.cfg.xml</value>  
  21.             <value>classpath:com/enation/groupware/user/test/enation_user.cfg.xml</value>  
  22.             <value>  
  23.                 classpath:com/enation/groupware/attachment/test/enation_attachment.cfg.xml   
  24.             </value>  
  25.         </list>  
  26.     </property>  

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics