普通ssm项目
直接修改mybatis-config.xml添加如下代码到
<settings></settings>标签里面
<setting name="logImpl" value="STDOUT_LOGGING"/>
springboot整合mybatis项目或者mybatis-plus项目,则再ylm、properties等文件中增加配置信息,以properties为例如下:
logging.level.xxx.mapper= debug
其中的xxx替换成mapper包的路径即可如com.a.b.c
以ymal为例如下:
mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl