spring boot 设置日志打印mybatis sql

最近使用springboot 想看到具体sql运行情况。经网上查找,发现springboot 自带 日志,只需要 在application.yml简单配置即可打印日志。

配置如下 :

logging:
  level:
    cn.com.xxx.xxx.mapper: debug #打印sql

配置 mapper所在的包的位置,配置日志等级debug 当debug启动时,即会 打印sql 

猜你喜欢

转载自blog.csdn.net/qq_36657997/article/details/88183203