进行JDBC连接时增加以下代码:
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/gjp?characterEncoding=utf-8", "root", "");