How to export sql statement in the console springboot integrated mybatis project? solved

springboot version 1.5.9

In yml or yaml file settings:

#打印sql语句
logging:
  level:
    com.iacp.dao : debug

In application.properties file settings:

#控制台打印sql
logging.level.com.iacp.dao=debug

Note: com.iacp.dao dao is your own path, to see someone online is written com.icap.dao * himself tried sql console is no output, it may be wrong with me, I hope you pay attention. this point!

Guess you like

Origin blog.csdn.net/it_erge/article/details/91040449