我的测试代码输出的日志
2015-12-07 10:11:12,483 org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:512) INFO - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@75412c2f: startup date [Mon Dec 07 10:11:12 CST 2015]; root of context hierarchy
2015-12-07 10:11:12,534 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:316) INFO - Loading XML bean definitions from class path resource [beans.xml]
2015-12-07 10:11:12,729 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:603) INFO - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2d8f65a4: defining beans [happy,springDaoRunner,ds,dao,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor]; root of factory hierarchy
ALL Nutz Log via Log4jLogAdapter
2015-12-07 10:11:12,753 org.nutz.log.Logs.<clinit>(Logs.java:20) INFO - Nutz is licensed under the Apache License, Version 2.0 .
Report bugs : https://github.com/nutzam/nutz/issues
2015-12-07 10:11:12,759 org.nutz.dao.impl.SimpleDataSource.<init>(SimpleDataSource.java:39) WARN - SimpleDataSource is use for Test/Attempt, NOT Using in Production environment!
2015-12-07 10:11:12,759 org.nutz.dao.impl.SimpleDataSource.<init>(SimpleDataSource.java:40) WARN - SimpleDataSource is NOT a Connection Pool, So it is slow but safe for debug/study
2015-12-07 10:11:12,891 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) INFO - Init file-pool by: C:\Users\wendal/.nutz/tmp/dao/ [200000]
2015-12-07 10:11:12,902 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) INFO - file-pool.cursor: 727
2015-12-07 10:11:12,912 org.nutz.dao.jdbc.Jdbcs.getExpert(Jdbcs.java:98) INFO - Get Connection from DataSource for JdbcExpert
2015-12-07 10:11:13,151 org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource.getTransactionAttribute(AbstractFallbackTransactionAttributeSource.java:107) DEBUG - Adding transactional method 'NutzHappyService.doUserClear' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; '',-java.lang.Exception
2015-12-07 10:11:13,271 org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:193) DEBUG - SELECT COUNT(*) FROM t_user
2015-12-07 10:11:13,284 org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:193) TRACE - Bound value [org.springframework.jdbc.datasource.ConnectionHolder@49c7b90e] for key [org.nutz.dao.impl.SimpleDataSource@73700b80] to thread [main]
2015-12-07 10:11:13,284 org.springframework.transaction.support.TransactionSynchronizationManager.initSynchronization(TransactionSynchronizationManager.java:272) TRACE - Initializing transaction synchronization
2015-12-07 10:11:13,285 org.springframework.transaction.interceptor.TransactionAspectSupport.prepareTransactionInfo(TransactionAspectSupport.java:444) TRACE - Getting transaction for [org.nutz.j2cache.spring.NutzHappyService.doUserClear]
2015-12-07 10:11:13,300 org.springframework.transaction.support.TransactionSynchronizationManager.getResource(TransactionSynchronizationManager.java:140) TRACE - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@49c7b90e] for key [org.nutz.dao.impl.SimpleDataSource@73700b80] bound to thread [main]
2015-12-07 10:11:13,300 org.nutz.dao.impl.sql.run.NutDaoExecutor._runStatement(NutDaoExecutor.java:313) DEBUG - DELETE FROM t_user
2015-12-07 10:11:13,302 org.springframework.transaction.support.TransactionSynchronizationManager.getResource(TransactionSynchronizationManager.java:140) TRACE - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@49c7b90e] for key [org.nutz.dao.impl.SimpleDataSource@73700b80] bound to thread [main]
2015-12-07 10:11:13,302 org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:488) TRACE - Completing transaction for [org.nutz.j2cache.spring.NutzHappyService.doUserClear] after exception: java.lang.RuntimeException
2015-12-07 10:11:13,302 org.springframework.transaction.interceptor.RuleBasedTransactionAttribute.rollbackOn(RuleBasedTransactionAttribute.java:131) TRACE - Applying rules to determine whether transaction should rollback on java.lang.RuntimeException
2015-12-07 10:11:13,303 org.springframework.transaction.interceptor.RuleBasedTransactionAttribute.rollbackOn(RuleBasedTransactionAttribute.java:148) TRACE - Winning rollback rule is: RollbackRuleAttribute with pattern [java.lang.Exception]
2015-12-07 10:11:13,308 org.springframework.transaction.support.TransactionSynchronizationManager.clearSynchronization(TransactionSynchronizationManager.java:331) TRACE - Clearing transaction synchronization
2015-12-07 10:11:13,308 org.springframework.transaction.support.TransactionSynchronizationManager.doUnbindResource(TransactionSynchronizationManager.java:243) TRACE - Removed value [org.springframework.jdbc.datasource.ConnectionHolder@49c7b90e] for key [org.nutz.dao.impl.SimpleDataSource@73700b80] from thread [main]
2015-12-07 10:11:13,313 org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:193) DEBUG - SELECT COUNT(*) FROM t_user
2015-12-07 10:11:13,313 org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1044) INFO - Closing org.springframework.context.support.ClassPathXmlApplicationContext@75412c2f: startup date [Mon Dec 07 10:11:12 CST 2015]; root of context hierarchy
2015-12-07 10:11:13,314 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:444) INFO - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2d8f65a4: defining beans [happy,springDaoRunner,ds,dao,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor]; root of factory hierarchy