@Service public class CustomerService { @Resource private CustoemrMapper customerMapper; public Customer getCustomerById(Long id) { return customerMapper.selectById(id); // 假设这里是103行 } }sql日志
日志解读2021-09-18 15:48:51.344 LogHelper.log:19 - CustomerService:getCustomerById:selectById:103 cost 49 select `id`, `name`, `sex`, `age` from customer where id = 3
2021-09-18 15:48:51.344 LogHelper.log:19 - CustomerService:getCustomerById:selectById:103 cost 49 select `id`, `name`, `sex`, `age` from customer where id = 3
2021-09-18 15:48:51.344 LogHelper.log:19 - CustomerService:getCustomerById:selectById:103 cost 49 select `id`, `name`, `sex`, `age` from customer where id = 3
2021-09-18 15:48:51.344 LogHelper.log:19 - CustomerService:getCustomerById:selectById:103 cost 49 select `id`, `name`, `sex`, `age` from customer where id = 3
2021-09-18 15:48:51.344 LogHelper.log:19 - CustomerService:getCustomerById:selectById:103 cost 49 select `id`, `name`, `sex`, `age` from customer where id = 3
2021-09-18 15:48:51.344 LogHelper.log:19 - CustomerService:getCustomerById:selectById:103 cost 49 select `id`, `name`, `sex`, `age` from customer where id = 3
在 CustomerService 中的 getCustomerById 方法中,调用mapper的 selectById 方法进行查询,执行时位于 103 行, 执行的sql是 select `id`, `name`, `sex`, `age` from customer where id = 3
快速开始: github[JDBCLogger]欢迎分享,转载请注明来源:内存溢出
评论列表(0条)