jdbc连接 sql server 2008 (1600版本) 报错的解决方案

报错1:
Failed to initialize pool: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
连接字符串中增加:
trustServerCertificate=true;
报错2:
com.microsoft.sqlserver.jdbc.SQLServerException: 该连接已关闭。
连接字符串中增加:
encrypt=false;

浙公网安备 33010602011771号