这是由于mysql驱动包跟新的缘故,不能再使用以前旧的mysql驱动包。
根据提示,更改相应的驱动包就可以了。
这个驱动更新还可能会引发一个错误:
java.sql.SQLNonTransientConnectionException: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ';characterEncoding=utf-8'
解决办法:
之前:jdbc:mysql://localhost:3306/tree?useUnicode=true&characterEncoding=utf-8
现在:jdbc:mysql://localhost:3306/tree?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT
将之前的链接改成现在的链接后,就不会出现这个问题。