配置logback使mybatis打印sql

To log SQL statements for particular mybatis mapper set DEBUG (TRACE to see query parameters and results) level for logger with fully qualified mapper name


You can log all SQL statements from all mappers if they are in the same package like this




    



    
 

I used the above code snippet in my logback.xml and got the sql query in logger. If require to print sql in specific logger, use tag.






   


你可能感兴趣的:(myBatis)