您的位置:首页 > 移动开发

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

2017-02-13 17:30 447 查看
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 个预定义的实体引用:

<    <   小于
>    >   大于
&   &   和号
'  '   省略号
"  "   引号


或者使用XML CDATA
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐