mybatis中设置打印sql语句application.yml

时间:2022-04-07 22:39:05

在application.yml配置文件中,找到数据源设置,添加:

mybatis:
configuration:
log-impl:org.apache.ibatis.logging.stdout.StdOutImpl

或者在含有logging标签配置文件中添加:

logging:
config:classpath:log4j2.xml
level:com.aa.server.dao.sdf:debug