很简单的问题,照着官方文档弄了一遍,但是结果就是不对。具体细节如下
1.sqlMapConfig.xml
2.PersonMapper.xml
3.测试类
结果控制台日志中打印了两次select语句。请问是什么原因呢?
DEBUG [main] - ooo Using Connection [com.mysql.jdbc.Connection@d36a6d]
DEBUG [main] - ==> Preparing: select * from t_person where pid = ?
DEBUG [main] - ==> Parameters: 1(Integer)
23822283
DEBUG [main] - Cache Hit Ratio [com.mybatis.person]: 0.0
DEBUG [main] - Opening JDBC Connection
DEBUG [main] - Created connection 1018140.
DEBUG [main] - ooo Using Connection [com.mysql.jdbc.Connection@f891c]
DEBUG [main] - ==> Preparing: **select * from t_person where pid = ? **
DEBUG [main] - ==> Parameters: 1(Integer)
13141603
在线等,万分感谢!