连接sql server时报错:
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]"
解决方案1、报错的原因是因为使用的JDK版本的问题,找到JDK安装文件下的java.security文件,我是安装的JDK11,在Linux中的文件路径是/usr/java/jdk-11.0.11/conf/security。
2、找到文件中的jdk.tls.legacyAlgorithms,将其中的TLS13, TLS12屏蔽或删除即可。


![连接SQL Server报错......TLS10 is not accepted by client preferences [TLS13, TLS12] 连接SQL Server报错......TLS10 is not accepted by client preferences [TLS13, TLS12]](http://www.mshxw.com/aiimages/31/711902.png)
