问答详情
源自:4-1 使用集成测试Service逻辑

为什么我的console没有打印出事务过程的日志

[org.springframework.test.context.TestContextManager] - @TestExecutionListeners is not present for class [class org.seckill.service.SeckillServiceTest]: using defaults.

[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [spring/spring-dao.xml]

[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [spring/spring-service.xml]

[org.springframework.context.annotation.ClassPathBeanDefinitionScanner] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

[org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@b66cc: startup date [Sat Sep 24 20:58:12 CST 2016]; root of context hierarchy

[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - Loading properties file from class path resource [jdbc.properties]

[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@18b3364: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,seckillServiceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,seckillDao,successSeckillDao]; root of factory hierarchy

[com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} inited

[org.seckill.service.SeckillServiceTest] - SeckillExcution [seckillId=1000, state=1, stateInfo=秒杀成功, successSeckillded=SuccessSeckill [seckillid=1000, userPhone=13623278092, state=-1, createTime=Sat Sep 24 20:58:13 CST 2016]]

[org.springframework.context.support.GenericApplicationContext] - Closing org.springframework.context.support.GenericApplicationContext@b66cc: startup date [Sat Sep 24 20:58:12 CST 2016]; root of context hierarchy

[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@18b3364: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,seckillServiceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,seckillDao,successSeckillDao]; root of factory hierarchy

[com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} closed


提问者:草薙京丶 2016-09-24 20:58

个回答

  • HeroChan
    2016-09-28 23:46:28

    com.alibaba.druid.pool.DruidDataSource 用的连接池 是alibaba的吗?

    SeckillExcution [seckillId=1000, state=1, stateInfo=秒杀成功, successSeckillded=SuccessSeckill [seckillid=1000, userPhone=13623278092, state=-1, createTime=Sat Sep 24 20:58:13 CST 2016]]


    [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@18b3364: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,seckillServiceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,seckillDao,successSeckillDao]; root of factory hierarchy

    [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} closed