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&amp;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&amp;characterEncoding=utf8</property>

在连接的数据库后面加:

useUnicode=true&amp;characterEncoding=utf8


全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务