在mybatis-config.xml:中加入以下配置即可
<settings> <!-- 打印查询语句 --> <setting name="logImpl" value="STDOUT_LOGGING" /> </settings>