解决报错(Could not create connection to database server.)
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
尝试多种方法后发现是由于mysql驱动版本太低导致。
报错,mysql版本是8.0.11,mysql-connector-java版本是5.1.31,后来把mysql-connector-java改为最新版运行成功。
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.15</version> </dependency>