在Mybatis 的配置文件中添加:
<settings> <!-- 打印查询语句 --> <setting name="logImpl" value="STDOUT_LOGGING" /> </settings>
同时可以配合IDEA插件 MyBatis Log Plugin 一起使用。