【发布时间】:2016-02-15 05:58:06
【问题描述】:
我正在使用 ibatis 对我的应用程序进行 OR 映射。我和我的团队正在开发两种不同的操作系统,系统是 UBUNTU 和 Windows xp。我有一个sqlmapconfig.xml 文件,我在其中引用了我的 ibatis 查询 xml 文件,我在其中编写了所有查询。
但是当我创建 sqlmapconfig 时,我想通过使用文件分隔符在 sql-map 标记的资源属性中给出我的 query.xml 的路径,以便它可以通过操作系统调整分隔符,因为我已经编写了如下代码sqlmapconfig.xml
<sqlMap
resource="file:com${file.separator}platysgroup${file.separator}lmexserver${file.separator}mobile${file.separator}dao${file.separator}ibatis{file.separator}lmexusermobileinfo.xml" />
但是当我运行我的应用程序时出现异常:
com.ibatis.common.xml.NodeletException:解析 XML 时出错。原因:java.lang.RuntimeException:解析 XPath '/sqlMapConfig/sqlMap' 时出错。原因:java.io.IOException:找不到资源文件:comfile.separatorplatysgroupfile.separatorlmexserverfile.separatormobilefile.separatordaofile.separatoribatis{file.separator}lmexusermobileinfo.xml`
如何解决这个问题?请帮帮我。
谢谢
【问题讨论】:
-
很抱歉没有写代码,我完全想念它。我的 sqlmapconfig.xml 代码是: