java服务器更换jdk版本后报错:javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is di
java,服务器更换jdk版本后报错:
1 | Caused by : javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) |
然后数据库出现:
1 2 3 4 | ### Error querying database. Cause: java.lang.reflect.UndeclaredThrowableException ### The error may exist in class path resource [mapper/sys/SysDictMapper.xml] ### The error may involve com.variflight.xzair.common.dao.sys.ISysDictMapper.queryAvailableDict ### The error occurred while executing a query |
原本好好的项目,服务器换了java的jdk版本后,
结果一启动就报这个错:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
网上找了很多文章,有的说tomcat依赖包冲突,有的说这个文件要改\jre\lib\security\java.security,经过测试都没有用
多次失败后我发现可能和连接 mysql 有关系
于是,我在 jdbc-url 中加了 &useSSL=false,居然不报错了
但是为什么从前的也是同样的配置并没有报错呢,我想到了jdk版本,于是我我换了jdk试,果然的不出我所料,换了jdk版本就不需要加 &useSSL=false
最后得出结论,之前的jdk版本默认不使用SSL连接mysql,而我现在电脑上的版本默认使用SSL链接mysql,所以需要指定不使用SSL
解决办法:
1 | &useSSL= false |
当前版本是1.8.0_291,之前的版本是1.8.0_161
来源:https://www.jianshu.com/p/611c78f68469
标签:
useSSL=false
, jdk
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
· Manus的开源复刻OpenManus初探
2020-06-15 RestTemplate/httpclient请求:请求参数中的特殊字符处理
2018-06-15 Spring MVC配置静态资源和资源包
2017-06-15 微信支付:微信支付遇到的坑:jssdk,phpdemo,微信支付提示{"errMsg":"chooseWXPay:fail"}