首页 > 代码库 > The reference to entity "characterEncoding" must end with the ';' delimiter.

The reference to entity "characterEncoding" must end with the ';' delimiter.

<property name="url" value="jdbc:mysql://localhost:3306/ceshi?useUnicode=true&characterEncoding=utf8" />

一个正常的MySQL配置却一直报错:

The reference to entity "characterEncoding" must end with the ‘;‘ delimiter.

逐步深究出在xml配置文件中需要替换转译的几个符号:

在xml文件中有以下几类字符要进行转义替换:

 

需要转译符号  >  <  ‘  "  &
转译对象 &gt; &lt; &apos; &quot; &amp;

 

 


 






The reference to entity "characterEncoding" must end with the ';' delimiter.