Ibatis SqlMapConfig.xml配置
以下两种加载SQL文件方式,
第一种按classpath加载
<!--
<sqlMap resource="../devConf/topology/queryData.xml" />
<sqlMap resource="../devConf/topology/insertData.xml" />-->
第二按文件目录加载,但在eclipse里不行,不知道为什么
<sqlMap url="file:../devConf/topology/queryData.xml" />
或写成绝对路径"file:///tmp/devConf/topology/queryData.xml"
<sqlMap url="file:../devConf/topology/insertData.xml" />
阅读(1416) | 评论(1) | 转发(0) |
<script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/buttonLite.js#style=-1&uuid=&pophcol=3&lang=zh"></script> <script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/bshareC0.js"></script>
以下两种加载SQL文件方式,
第一种按classpath加载
<!--
<sqlMap resource="../devConf/topology/queryData.xml" />
<sqlMap resource="../devConf/topology/insertData.xml" />-->
第二按文件目录加载,但在eclipse里不行,不知道为什么
<sqlMap url="file:../devConf/topology/queryData.xml" />
或写成绝对路径"file:///tmp/devConf/topology/queryData.xml"
<sqlMap url="file:../devConf/topology/insertData.xml" />