1、在mybatis.config.xml中增加如下配置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD SQL Map Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="logImpl" value="STDOUT_LOGGING" />
</settings>
</configuration>
2、在SpringBoot中,修改application.yml文件
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl