操作数据库出现错误: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed 解决方案:在连接数据库的url中,加上allowPublicKeyRetrieval=true参数。
很神奇的是,在使用这种方法连接成功一次后,再去掉allowPublicKeyRetrieval=true参数,还是能够正常连接,但重启数据库之后又不行了,应该是缓存了连接信息的原因。