第一种:
#mybatis plus 设置
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
#log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl #关闭sql日志
第二种:
logging:
level:
com.app.mapper: debug
第三种:
//官方引入插件!!!
<!-- https://mvnrepository.com/artifact/p6spy/p6spy -->
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>3.9.1</version>
</dependency>
Mybatis
#Mybatis输出sql日志
logging:
level:
org.jeecg.modules.system.mapper : debug
个人参考:mybatis-plus开启sql日志打印_mybatisplus 打印sql_图图小淘气_real的博客-CSDN博客