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

r囧r小猫 2022-07-28 04:12 250阅读 0赞

数据源配置时加上编码转换格式后出问题了:

The reference to entity “characterEncoding” must end with the ‘;’ delimiter

这个错误就是 context.xml中设置数据源链接URL的问题

  1. <param-name>url</param-name>
  2. <param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value>

正确的如下:

  1. <param-name>url</param-name>
  2. <param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value>

这大概是由xml文件中的编码规则决定要这么变换。

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





























&lt;

<

小于号

&gt;

>

大于号

&amp;

&

&apos;

单引号

&quot;

双引号

发表评论

表情:
评论列表 (有 0 条评论,250人围观)

还没有评论,来说两句吧...

相关阅读