在连接数据库的url中,加上allowPublicKeyRetrieval=true 原博文:https://blog.csdn.net/Gushiyuta/article/details/93239648