美文网首页
JDBC报 Could not initialize class

JDBC报 Could not initialize class

作者: 小天奇 | 来源:发表于2019-11-25 19:48 被阅读0次

困扰了我好几天的错误终于解决了,对新手太不友好了。每次连接数据库时就会报错,就是下面的地方。

DriverManager.getConnection() 这里就会报错
 Could not initialize class sun.security.ssl.SSLKeyExchange

太难受了。
在url后面加个参数userSSL=false例:

url = jdbc:mysql://localhost:3306/db_testjpa?serverTimezone=GMT%2B8&useSSL=false

相关文章

网友评论

      本文标题:JDBC报 Could not initialize class

      本文链接:https://www.haomeiwen.com/subject/zkojwctx.html