因项目需要,要将hibernate 的mapping分组配置,查看相关资料后实验成功:
xml 代码
- <!-- 此处为数据总线相关hbm文件映射 -->
- <property name="mappingResources">
- <list>
- <value>
- com/enation/framework/groupware/User.hbm.xml
- </value>
- <value>
- com/enation/framework/groupware/Group.hbm.xml
- </value>
- <value>
- com/enation/framework/groupware/Dict.hbm.xml
- </value>
- </list>
- </property>
- <!-- 此处为组件相关hbm文件映射 -->
- <property name="configLocations">
- <list>
- <value>classpath:com/enation/groupware/product/test/enation_product.cfg.xml</value>
- <value>classpath:com/enation/groupware/infomation/test/enation_infomation.cfg.xml</value>
- <value>classpath:com/enation/groupware/user/test/enation_user.cfg.xml</value>
- <value>
- classpath:com/enation/groupware/attachment/test/enation_attachment.cfg.xml
- </value>
- </list>
- </property>