java关于报错:The reference to entity “characterEncoding” must end with the ‘;’ delimiter.
Java 解析XML文件错误。
错误信息提示代码类似如下:
The reference to entity “characterEncoding” must end with the ‘;’ delimiter.
org.xml.sax.SAXParseException: The reference to entity “characterEncoding” must end with the ‘;’ delimiter.
纠错结果:
在配置一个访问数据库的Url时,第一次设置的内容如下:
jdbc:mysql://localhost:3306/boot_crm?useUnicode=true&characterEncoding=utf8,注意中间那个“&”,在xml中这个是读不出的,正确写法将“&”转义&//“&”: