Home  >  Q&A  >  body text

java - Spring boot+mybatis 打印sql

最近学习springboot+mybatis+logback 请问如何打印sql

黄舟黄舟2764 days ago666

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-04-17 17:43:11

    You should say which logging framework you use, if it is log4J
    Set the log level of your mapper package to debug to print out the SQL

    You can also use the p6spy library to print SQL

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:43:11

    Recommendedlog4jdbc,可以打印出随手可用的sql

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:43:11

    http://stackoverflow.com/ques...
    You can directly define logging.level.com.abc=DEBUG

    in application.properties

    reply
    0
  • Cancelreply