在spring中加入多个映射文件

来自: http://yuntian.name/?p=83
1、普通

<property name=”mappingResources”>
<value>com/mycompany/user/model/user.hbm.xml</value>
<value>com/mycompany/money/model/money.hbm.xml</value>
</property>

2、mappingDirectoryLocations

<property name=”mappingDirectoryLocations”>
<value>classpath*:/com/cgdangdang/**/model/</value>
</property>

3、mappingLocations

<property name=”mappingLocations”>
<value>classpath*:/com/cgdangdang/**/*.hbm.xml</value>
</property>

posted @ 2009-09-29 16:20  wj-conquer  阅读(180)  评论(0编辑  收藏  举报