The server selected protocol version TLS10 is not accepted by client preferences [TLS12]

先说基础环境:

jdk版本:1.8.0_321

sqlserver数据库版本:2012

jdbc版本:6.2.2.jre8

 

本地测试木问题,但一发到线上,报错:

The server selected protocol version TLS10 is not accepted by client preferences [TLS12]

大意是两边的TLS版本不一致导致。

 

做如下修改:

在java安装目录下,找到如下文件:

/jdk1.8.0_321/jre/lib/security/java.security

进行编辑,搜索关键字:

jdk.tls.disabledAlgorithms

去掉TLSv1、TLSv1.1、3DES_EDE_CBC,如图:

 

 

然后保存一下即可。

 

记得重启下java应用噢~

 

 

如果对您帮助的话,麻烦点个赞再走吧~

 

posted @ 2022-03-21 17:29  吴所畏惧  阅读(1363)  评论(0编辑  收藏  举报