Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!] with root cause!
错误原因为:dbconfig.properties中 引入的参数名没有加前缀
错误代码为:
username=root
password=root
jdbcurl=jdbc:mysql://localhost:3306/mybatis_01
driverclass=com.mysql.jdbc.Driver
修改后:
jdbc.user=root
jdbc.password=root
jdbc.jdbcUrl=jdbc:mysql://localhost:3306/mybatis_01
jdbc.driverClass=com.mysql.jdbc.Driver
数据库就正确链接了。