idea开启控制台打印sql语句模式,并结合mybatis log plugin打印完整sql
1、在SpringBoot中,修改application.yml文件
修改内容如下:
# 加载全局的配置文件
mybatis.configLocation=classpath:mybatis/mybatis-config.xml
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
在mybatis配置文件中添加日志配置内容
修改如下
<setting name="logImpl" value="STDOUT_LOGGING" />