How to print the executed SQL statement in the console of SpringBoot

Set the log output level to DEBUG
Insert picture description here

Method 1 : application.yml

## 设置debug可以打印Sql语句
logging:
  level:
    com:
      company:
        cache: debug

Method 2 : application.properties

logging.level.com.company.cache=debug

Guess you like

Origin blog.csdn.net/qq_47768542/article/details/111184131