新项目报:Caused by: javax.net.ssl.SSLHandshakeException:

新项目报:Caused by: javax.net.ssl.SSLHandshakeException:,第1张

新项目启动,报错,错误见下面三个图片

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

解决办法

在项目配置文件yml的mysql的url 最后添加 &useSSL=false

jdbc:mysql://192.168.1.101:3306/xxx_admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false


添加后就不再报错。


原因:当前jdk版本 jdk1.8.0_301
:“useSSL=true 是进行安全验证,一般通过证书或者令牌,useSSL=false就是通过账号密码进行连接,通常使用useSSL=false。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/567648.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-09
下一篇 2022-04-09

发表评论

登录后才能评论

评论列表(0条)

保存