您的当前位置:首页正文

springboot配置mybatis打印sql

来源:九壹网
springboot配置mybatis打印sql

springboot 配置mybatis打印sql⽅式 ⼀:

###########################################################配置打印sql

########################################################logging: level:

com.threefivework.mymall.dao.mapper: DEBUG //包路径为mapper⽂件包路径⽅式⼆:

在application.yml(.properties)中增加配置,在控制台打印sql:

mybatis

configuration:

log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

参考类:org.apache.ibatis.session.Configuration

log-impl指定的值为org.apache.ibatis.logging.Log接⼝的某个实现类

因篇幅问题不能全部显示,请点此查看更多更全内容

Top