Ao se deparar com erro de conexão no SQL Server:


"encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.


Ajustar as propriedades da string de conexão:


encrypt=true;trustServerCertificate=true