解决1:依赖注入有问题,mysql 的版本是8.0,依赖注入的是5.0,所以导致报错
解决2:没有加时区
改动前:
String url = “jdbc:mysql://localhost:3306/test?”;
改动后:
String url = “jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8”;
其余的解决方法请参考下面的博文:
https://www.jianshu.com/p/7cf427920e6f
Connections could not be acquired from the underlying database!
最新推荐文章于 2023-10-22 20:09:43 发布