在springBoot的控制台打印sql语句

在springBoot+Mybatis日志显示SQL的执行情况的最简单方法就是在properties新增:

 properties形式

logging.level.com.eth.wallet.mapper=debug

yml形式

logging:
  level:
    com.eth.wallet.mapper: debug

 其中com.eth.wallet.mapper为你的mapper接口所在位置,debug为日志级别(debug可更改为其它级别!)

你可能感兴趣的:(在springBoot的控制台打印sql语句)