'how to fix The server selected protocol version TLS10 is not accepted by client preferences [TLS12]

I want to run a spring boot application with a sql server data base but when I run it, the following error appears :

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]


Solution 1:[1]

TLS 1.2 must be configured on SQL Server: https://support.microsoft.com/en-us/topic/kb3135244-tls-1-2-support-for-microsoft-sql-server-e4472ef8-90a9-13c1-e4d8-44aad198cdbe

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter Kalef ' DidiSoft