Mybatis 与 log4j 配置打印sql
Mybatis默认使用有slf4j
必须加上依赖
<
dependency
>
<
groupId
>org.slf4j</
groupId
>
<
artifactId
>slf4j-log4j12</
artifactId
>
<
version
>1.7.5</
version
>
</
dependency
>
<
dependency
>
<
groupId
>org.slf4j</
groupId
>
<
artifactId
>slf4j-api</
artifactId
>
<
version
>1.7.5</
version
>
</
dependency
>
否则是怎么配置log4j都是无法打印mybatis的sql到日志