org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [XXX.xml]';

来源:互联网 发布:淘宝登陆界面 编辑:程序博客网 时间:2024/05/29 16:59

tomcat启动时报错:

Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [XXX.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 186; columnNumber: 32; 在实体引用中, 实体名称必须紧跟在 '&' 后面。

由于在mapper中用了不正确的字符
例如:
这个是错的

这里应该使用

<if test="SALER_NAME!=null and SALER_NAME!=''">    and INSTR(i.saler_name,#{SALER_NAME})</if>

在 XML 中有 5 个预定义的实体引用:

&lt;    <   小于&gt;    >   大于&amp;   &   和号&apos;  '   省略号&quot;  "   引号

或者使用XML CDATA

0 0