当前位置:   article > 正文

springboot使用sqlserver报错The server selected protocol version TLS10 is not accepted by client preferen

springboot使用sqlserver报错The server selected protocol version TLS10 is not accepted by client preferen

驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS12]”

解决
查找java安装位置
idea
在这里插入图片描述

在这里插入图片描述
可以看到这个位置
D:\app\java\jdk\jre\lib\security

打开java.security修改
在这里插入图片描述
找到jdk.tls.disabledAlgorithms

如果有TLSv1、TLSv1.1、3DES_EDE_CBC,要删除后再保存,注意以管理员形式保存,在修改的时候要注意此时要把项目程序关闭
修改为

jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, anon, NULL, \
    include jdk.disabled.namedCurves
  • 1
  • 2
  • 3

启动项目可以访问了

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号