问题已解决,请看博文:数据库连接(都是一样的原因)
21:32:15,357 INFO DefaultTestContextBootstrapper:259 - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
21:32:15,389 INFO DefaultTestContextBootstrapper:207 - Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [org/springframework/web/context/request/RequestAttributes]
21:32:15,391 INFO DefaultTestContextBootstrapper:185 - Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@b97c004, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@4590c9c3, org.springframework.test.context.support.DirtiesContextTestExecutionListener@32e6e9c3, org.springframework.test.context.transaction.TransactionalTestExecutionListener@5056dfcb, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@6574b225]
21:32:15,534 INFO XmlBeanDefinitionReader:317 - Loading XML bean definitions from class path resource [applicationContext.xml]
21:32:15,705 INFO GenericApplicationContext:578 - Refreshing org.springframework.context.support.GenericApplicationContext@1e88b3c: startup date [Fri Jan 11 21:32:15 CST 2019]; root of context hierarchy
21:32:15,842 INFO MLog:80 - MLog clients using log4j logging.
21:32:16,323 INFO C3P0Registry:204 - Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
21:32:16,563 INFO AbstractPoolBackedDataSource:462 - Initializing c3p0 pool