解决方案很简单,就是把配置项值中用到"&"的地方改成"&"。原因是sax解析的类库在读取文件的时候是根据转义后的格式进行读取的,遇到"&"就认为是一个转义字符串,开始找结束符";",找不到自然就报错了。
相关文章
- java报错:The reference to entity "characterEncoding" must end with the ';' delimiter.
- Caused by: org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.
- 在java的xml文件配置数据库URL地址时提示The reference to entity "characterEncoding" must end with the ';' delimiter.错误信息
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter (Mybatis + Mysql)
- xml文件中配置JDBC源遇到问题 : The reference to entity "characterEncoding" must end with the ';' delimiter