项目启动连接mysql数据库时报了如下错误
Caused by: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
at sun.security.provider.certpath.PKIXCertPathValidator.validate(Unknown Source)
at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown Source)
at java.security.cert.CertPathValidator.validate(Unknown Source)
at com.mysql.cj.protocol.ExportControlled$X509TrustManagerWrapper.checkServerTrusted(ExportControlled.java:273)
... 26 common frames omitted
解决办法,在数据库连接中设置useSSL=false
jdbc:mysql://192.168.86.134:3307/material?useUnicode=true&characterEncoding=UTF8&useSSL=false