mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations区别
来源:互联网 发布:淘宝crm软件有哪些 编辑:程序博客网 时间:2024/06/05 10:52
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- 它们的区别:
- 1. mappingResources:指定classpath下具体映射文件名
- <property name="mappingResources">
- <value>petclinic.hbm.xml </value>
- </property>
- 2. mappingLocations:可以指定任何文件路径,并且可以指定前缀:classpath、file等
- <property name="mappingLocations">
- <value>/WEB-INF/petclinic.hbm.xml </value>
- </property>
- <property name="mappingLocations">
- <value>classpath:/com/company/domain/petclinic.hbm.xml </value>
- </property>
- 也可以用通配符指定,'*'指定一个文件(路径)名,'**'指定多个文件(路径)名,例如:
- <property name="mappingLocations">
- <value>classpath:/com/company/domainmaps/*.hbm.xml </value>
- </property>
- 上面的配置是在com/company/domain包下任何maps路径下的hbm.xml文件都被加载为映射文件
- 3. mappingDirectoryLocations:指定映射的文件路径
- <property name="mappingDirectoryLocations"> <list>
- <value>WEB-INF/HibernateMappings</value>
- </list>
- </property>
- 也可以通过classpath来指出
- <property name="mappingDirectoryLocations">
- <list>
- <value>classpath:/XXX/package/</value>
- </list>
- </property>
0 0
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations区别
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations区别
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations 区别
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingDirectoryLocations/mappingJarLocations/mappingResources/mappingLocations的区别
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations 他们的区别
- mappingResources、mappingLocations、mappingDirectoryLocations与mappingJarLocations 区别
- spring配置文件中的mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations区别
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations配置映射文件时的区别
- hibernate 配置 mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
- mappingLocations、mappingDirectoryLocations与mappingJarLocations 区别
- mappingLocations、mappingDirectoryLocations与mappingJarLocations
- Spring hibernate配置中mappingLocations、mappingDirectoryLocations与mappingJarLocations 区别
- Android 增量更新实例(Smart App Updates)
- getClass().getResourceAsStream() .获取配置文件的方法 .
- ACM中杨辉三角的多种解法
- HDU 1266 Reverse Number
- uboot配置分析(jz2440开发板)
- mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations区别
- Add two numbers-list,string
- 华为机试——03操作系统任务调度问题
- Ubuntu14.04 安装WineQQ 2013
- LeetCode | Interleaving String(交叉字符串)
- 杂文 ZOJ问题 hdoj 3788
- 设置UITableview 浮动的 header
- android学习---Gallery画廊视图
- FastReport实现自动填充