0
点赞
收藏
分享

微信扫一扫

SpringBoot开发环境下开启mybatis日志控制台SQL打印

Soy丶sauce 2022-04-08 阅读 46
java后端

原先的配置如下:

mybatis:
  type-aliases-package: com.newmall.pojo # 所有POJO类所在包路径
  mapper-locations: classpath:mapper/*.xml # mapper映射文件

为了测试方便需要开启mybatis日志sql打印,只需要加configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl配置即可在控制台中看到执行的sql。

mybatis:
  type-aliases-package: com.newmall.pojo # 所有POJO类所在包路径
  mapper-locations: classpath:mapper/*.xml # mapper映射文件
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
举报

相关推荐

0 条评论