第一个测试,启动时,数据库可以正常连接,让输出查到的值可以输出,但是老是报com/mysql/jdbc/Driver类找不到的警告
2018-10-11 15:11:06.377 WARN 10736 --- [HelperThread-#2] c.m.v2.c3p0.DriverManagerDataSource : Could not load driverClass com.mysql.jdbc.Driver;
java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_66]
at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_66]
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696) [mchange-commons-java-0.2.11.jar:0.2.11]
2018-10-11 15:11:06.379 WARN 10736 --- [HelperThread-#1] c.m.v2.c3p0.DriverManagerDataSource : Could not load driverClass com.mysql.jdbc.Driver;
java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_66]
at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_66]
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870) [c3p0-0.9.5.2.jar:0.9.5.2]
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696) [mchange-commons-java-0.2.11.jar:0.2.11]
东苑
北苑
2018-10-11 15:11:06.972 INFO 10736 --- [ Thread-2] o.s.w.c.s.GenericWebApplicationContext : Closing org.springframework.web.context.support.GenericWebApplicationContext@4d465b11: startup date [Thu Oct 11 15:11:01 CST 2018]; root of context hierarchy