开启mybatis日志打印sql语句配置

839 阅读1分钟

1、在配置文件中添加两行配置即可

mybatis:
  type-aliases-package: com.imooc.pojo #实体类的存放位置
  mapper-locations: classpath:mapper/*.xml
  
  configuration: # 日志配置,控制台输出
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

2、效果如下