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

我在配置c3p0-config.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/person?useUnicode=true&characterEncoding=utf8</property>
<property name="user">root</property>
<property name="password">123321</property>
<property name="acquireIncrement">2</property>
<property name="initialPoolSize">5</property>
<property name="minPoolSize">1</property>
<property name="maxPoolSize">5</property>
</default-config>
</c3p0-config>

标红的这一句配置出错!!

解决办法:

<property name="jdbcUrl">jdbc:mysql://localhost:3306/person?useUnicode=true&characterEncoding=utf8</property>

改为:

<property name="jdbcUrl">jdbc:mysql://localhost:3306/person?useUnicode=true&amp;characterEncoding=utf8</property>

 

posted @ 2017-07-27 11:21  杯酒故人  阅读(1786)  评论(0编辑  收藏  举报