public List<Seckill> queryAll(int offset, int limit); 没有给定参数名称时,系统日志没有打印报错信息

来源:4-8 DAO层单元测试编码和问题排查(上)

ranjiexu

2016-07-02 17:23

测试查询所有秒杀商品时,虽然没有通过,但是控制台没有给出报错信息。这是什么原因呢?

以下是给出的信息:

七月 02, 2016 5:10:45 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames
信息: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
七月 02, 2016 5:10:45 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners
信息: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@48a242ce, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1e4a7dd4, org.springframework.test.context.support.DirtiesContextTestExecutionListener@4f51b3e0, org.springframework.test.context.transaction.TransactionalTestExecutionListener@4b9e255, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@5e57643e]
七月 02, 2016 5:10:45 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring-dao.xml]
七月 02, 2016 5:10:46 下午 org.springframework.context.support.GenericApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.GenericApplicationContext@70b0b186: startup date [Sat Jul 02 17:10:46 CST 2016]; root of context hierarchy
七月 02, 2016 5:10:46 下午 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer loadProperties
信息: Loading properties file from class path resource [jdbc.properties]
七月 02, 2016 5:10:46 下午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
七月 02, 2016 5:10:47 下午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
17:10:47.380 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
17:10:47.593 [main] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis-config.xml]'
17:10:47.711 [main] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [D:\ranjiexu\eclipseworkspace\seckill\target\classes\mapper\SeckillMapper.xml]'
17:10:47.745 [main] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [D:\ranjiexu\eclipseworkspace\seckill\target\classes\mapper\SuccessKilledMapper.xml]'
17:10:50.611 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
17:10:50.646 [main] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@617fe9e1] was not registered for synchronization because synchronization is not active
17:10:50.662 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@617fe9e1]
七月 02, 2016 5:12:58 下午 org.springframework.context.support.GenericApplicationContext doClose
信息: Closing org.springframework.context.support.GenericApplicationContext@70b0b186: startup date [Sat Jul 02 17:10:46 CST 2016]; root of context hierarchy


写回答 关注

3回答

  • 一户一世界
    2016-07-04 10:09:54
    已采纳

    到JUnit下看下呢

    http://img.mukewang.com/5779c56f0001064411930271.jpg

    ranjie...

    非常感谢!

    2016-07-25 20:31:21

    共 2 条回复 >

  • I醉里挑灯看剑
    2016-09-26 13:52:34

    我的junit一直卡在Validating seckill不动是咋回事

  • 一户一世界
    2016-07-21 20:16:13


    要控制台打日志,可以使用slf4j+logback等日志记录;

Java高并发秒杀API之业务分析与DAO层

Java实现高并发秒杀API的第一门课,还等什么,赶快来加入吧

87424 学习 · 496 问题

查看课程

相似问题