Zhong1
2017-03-18 16:21
我用的navicat junit 没有报异常
console里面
[SpringTransaction] 2017-03-18 16:16:32 Loading XML bean definitions from class path resource [applicationContext1.xml]
[SpringTransaction] 2017-03-18 16:16:32 Refreshing org.springframework.context.support.GenericApplicationContext@62c09554: startup date [Sat Mar 18 16:16:32 CST 2017]; root of context hierarchy
[SpringTransaction] 2017-03-18 16:16:33 Loading properties file from class path resource [jdbc.properties]
[SpringTransaction] 2017-03-18 16:16:33 JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[SpringTransaction] 2017-03-18 16:16:33 Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@51a19458: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,accountService,accountDAO,transactionManager,transactionTemplate,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
[SpringTransaction] 2017-03-18 16:16:33 MLog clients using log4j logging.
[SpringTransaction] 2017-03-18 16:16:33 Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
[SpringTransaction] 2017-03-18 16:16:33 Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge1699m1qad2emp3xn7p|21c783c5, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge1699m1qad2emp3xn7p|21c783c5, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/test, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
[SpringTransaction] 2017-03-18 16:16:33 Closing org.springframework.context.support.GenericApplicationContext@62c09554: startup date [Sat Mar 18 16:16:32 CST 2017]; root of context hierarchy
[SpringTransaction] 2017-03-18 16:16:33 Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@51a19458: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,accountService,accountDAO,transactionManager,transactionTemplate,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
数据库里面的值加减都不变 不知什么原因
代码贴出来,可能是事物回滚了
你的spring配置文件没有加入,或路径不对
没加事务就出现异常了java.lang.IllegalStateException: Failed to load ApplicationContext
Spring事务管理
87318 学习 · 197 问题
相似问题