问题描述
Mysql连接时能正确返回结果但是有警告,大概意思是:说建立ssl连接,但是服务器没有身份认证,这种方式不推荐使用。
解决方案
在URL链接后加上 ?useUnicode=true&characterEncoding=utf-8&useSSL=false
例如:
(原来的)
mysqlURL=”jdbc:mysql://localhost:3306/class”
(更改为)
mysqlURL=”jdbc:mysql://localhost:3306/class?useUnicode=true&characterEncoding=utf-8&useSSL=false”