C3P0连接池操作数据库在Navicat里显示中文为??
<?xml version="1.0" encoding="UTF-8"?>
<c3p0-config>
<default-config>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="jdbcUrl">jdbc:mysql:///web08?useUnicode=true&characterEncoding=utf8</property>
<property name="user">root</property>
<property name="password">root</property>
<property name="initialPoolSize">5</property>
<property name="maxPoolSize">20</property>
</default-config>
</c3p0-config>
注意:
<property name="jdbcUrl">jdbc:mysql:///web08?useUnicode=true&characterEncoding=utf8</property>
在连接的数据库后面加:
useUnicode=true&characterEncoding=utf8