当前位置: 代码迷 >> 综合 >> The reference to entity characterEncoding must end with the ';' delimiter.
  详细解决方案

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

热度:37   发布时间:2023-12-26 10:39:38.0

使用c3p0连接池连接数据库时,使用的xml配置文件

根据往常的格式直接copy报错,因为xml文件内&符号需要被转义

所以&需要使用&替换

<?xml version="1.0" encoding="UTF-8" ?>
<c3p0-config><default-config><property name="driverClass">com.mysql.jdbc.Driver</property><property name="jdbcUrl">jdbc:mysql://localhost:3306/epoint01?useUnicode=true&amp;characterEncoding=utf8&amp;serverTimezone=GMT%2B8&amp;useSSL=false</property><property name="user">root</property><property name="password">Gepoint</property><property name="initialPoolSize">5</property><property name="maxPoolSize">20</property></default-config></c3p0-config>

 

  相关解决方案