美文网首页
IDEA打印sql springboot 配置mybatis打印

IDEA打印sql springboot 配置mybatis打印

作者: yichen_china | 来源:发表于2020-12-30 14:37 被阅读0次

springboot 配置mybatis打印sql

方式 一:

配置打印sql

########################################################
logging:
level:
com.threefivework.mymall.dao.mapper: DEBUG //包路径为mapper文件包路径

方式二:</pre>

在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接口的某个实现类

分类: spring boot

相关文章

网友评论

      本文标题:IDEA打印sql springboot 配置mybatis打印

      本文链接:https://www.haomeiwen.com/subject/mejhoktx.html