解决mysql连接池乱码

刚刚转了一份mysql乱码的文章,但我还是想自己写一篇自己的方法:

<?xml version='1.0' encoding='utf-8'?>
<Context reload="true">
 <Resource name="jdbc/bookstore" auth="Container"
  type="javax.sql.DataSource"
  maxActive="100" maxIdle="30" maxWait="10000"
  username="root" password="root"
  driverClassName="com.mysql.jdbc.Driver"
  url="jdbc:mysql://localhost:3306/book?autoReconnect=true;useUnicode=true;characterEncoding=GBK
  "/>
</Context>

加上红色部分即可。

完事了,继续工作。。。。。

对了,感谢我转载的作者,呵呵
  

你可能感兴趣的:(sql,xml,工作,mysql,jdbc)