the first method
New mybatis-config.xml in the folder mybatis
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <settings> <!-- 打印查询语句 --> <setting name="logImpl" value="STDOUT_LOGGING" /> </settings> </configuration>
In the application.properties
mybatis.config-location=classpath:mybatis/mybatis-config.xml
The second method
In application.properties file
#mapper interface address
logging.level.com.xxx.xxx.mapper=DEBUG