赞
踩
springboot+mybatis+sqlserver进行开发时遇到下列问题:
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:54e7d01d-ffd4-4eed-ae10-77f70ba1ac28] with root cause
网上搜索,看到其他博主在官网找到解决方案,地址:
https://blogs.msdn.microsoft.com/dataaccesstechnologies/2016/11/30/intermittent-jdbc-connectivity-issue-the-driver-could-not-establish-a-secure-connection-to-sql-server-by-using-secure-sockets-layer-ssl-encryption-error-sql-server-returned-an-incomplete-respons/
看到“该问题仅在使用低于 4.2 版的旧 JDBC 驱动程序时才会出现。”
那就试一下吧。将pom.xml中的依赖注释掉:
<dependency> <groupId&g
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。