com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4007ad -- Acquisition Attempt Failed!!!

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
	at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	
	Caused by: java.lang.NullPointerException
	at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3299)
	
	21:42:35,028  WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4007ad -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
	at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
	com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
	at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)

第一:新建项目:
在这里插入图片描述
第二:

在这里插入图片描述
第三:
在这里插入图片描述
提醒:
建完之后不需要导入包,只要itheima_spring_test.iml这个文件配置好,IDE会自动调入需要的包的

还有一点要注意,这里的驱动一定要和你本地的mysql的版本是一样的
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/xiaoxiamimm/article/details/113749331