在mybatis的SqlMapConfig.xml配置文件中:
<configuration>
<settings>
<!-- 打印查询语句 -->
<setting name="logImpl" value="STDOUT_LOGGING" />
</settings>
</configuration>
其中, logImpl的参数有:
具体可以参考mybatis官方文档:http://www.mybatis.org/mybatis-3/zh/logging.html