Mybatis输出sql语句日志

在mybatis的SqlMapConfig.xml配置文件中:

<configuration>
    <settings>
        <!-- 打印查询语句 -->
        <setting name="logImpl" value="STDOUT_LOGGING" />
    </settings>
</configuration>

其中, logImpl的参数有:
这里写图片描述

具体可以参考mybatis官方文档:http://www.mybatis.org/mybatis-3/zh/logging.html

猜你喜欢

转载自blog.csdn.net/lx_nhs/article/details/79083100