The string "--" is not permitted within comments.
Posted blog411032
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The string "--" is not permitted within comments.相关的知识,希望对你有一定的参考价值。
最近用mybatis做开发的时候遇到这个错:The string "--" is not permitted within comments.
经检查是mapper.xml配置文件注解的时候出现了问题:<!-- 保存生产企业资质管理 -- 配送企业 信息 -->
上面的这个注解是不被允许的(加粗部分两个"--"),影响项目启动的时候mybatis解析配置文件,导致项目启动出错。
Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414) at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(XMLScanner.java:774) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanComment(XMLDocumentFragmentScannerImpl.java:1040) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2953) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:251) ... 28 more
以上是关于The string "--" is not permitted within comments.的主要内容,如果未能解决你的问题,请参考以下文章
ibatis项目启动报错The string "--" is not permitted within comments原
Linux shell :两字符串比较。 输入两不同字符串,结果确显示:the two string are equal!! 郁闷。。。。
报错The "chunk" argument must be one of type string or Buffer. Received type object
如何从一个Dictionary里取得第i个key和Value
java解析json,The constructor JSONObject(String) is undefined,错哪了啊??
The specified value "2019-1-2" does not conform to the required format, "yyyy-MM-dd&q