key words:mappingResources,通配符,
mappingDirectoryLocations
平时写mapping的文件需要一个一个的放到配置文件里,比如
可以用更一步到位的方法:
平时写mapping的文件需要一个一个的放到配置文件里,比如
1.
<
property
name
="mappingResources"
>
2. < list >
3. < value > net/foxlog/model/Classes.hbm.xml </ value >
4. < value > net/foxlog/model/Parent.hbm.xml </ value >
5. < value > net/foxlog/model/Child.hbm.xml </ value >
6. < value > net/foxlog/model/User.hbm.xml </ value >
7. </ list >
8. </ property >
2. < list >
3. < value > net/foxlog/model/Classes.hbm.xml </ value >
4. < value > net/foxlog/model/Parent.hbm.xml </ value >
5. < value > net/foxlog/model/Child.hbm.xml </ value >
6. < value > net/foxlog/model/User.hbm.xml </ value >
7. </ list >
8. </ property >
可以用更一步到位的方法:
1.
<
property
name
="mappingDirectoryLocations"
>
2. < list >
3. < value > classpath*:/org/springside/bookstore/commons/model/hbm </ value >
4. </ list >
5. </ property >
2. < list >
3. < value > classpath*:/org/springside/bookstore/commons/model/hbm </ value >
4. </ list >
5. </ property >