springboot连接sqlserver报错

报错1:The server selected protocol version TLS10 is not accepted

 

 解决:找到Java的java.security文件,并删除“TLSv1, TLSv1.1, 3DES_EDE_CBC”,这三个参数:

 

 

报错2:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

解决:在数据库的urll配置中添加:

encrypt = true;trustServerCertificate=true;

posted @ 2023-01-04 10:47  Caesar_the_great  阅读(915)  评论(0编辑  收藏  举报