客户端首选项不接受如何修复服务器选择的协议版本TLS10[TLS12]

2022-05-29 00:00:00 sql tls1.2 java

我想运行带有SQL服务器数据库的Spring Boot应用程序,但当我运行它时,出现以下错误:

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 [TLS12]". ClientConnectionId:73ea4fa4-e772-4fd7-90f5-d617aec091f2
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2924) ~[mssql-jdbc-7.4.1.jre8.jar:na]
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1881) ~[mssql-jdbc-7.4.1.jre8.jar:na]

解决方案

必须在SQL Server上配置TLS1.2:https://support.microsoft.com/en-us/topic/kb3135244-tls-1-2-support-for-microsoft-sql-server-e4472ef8-90a9-13c1-e4d8-44aad198cdbe

相关文章