Foreword:
Under normal circumstances, MyBatis Plus will not print the executed SQL statement on the console, but when development encounters a BUG, we often need to view the SQL statement on the console to diagnose the error.
Just add the following configuration to the Spring Boot yml file
mybatis-plus:
configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl