简体   繁体   English

怎么做Ibatis版本的show sql

[英]how to do Ibatis version of show sql

Is there an Ibatis setting to view the generated SQL like how Hibernate has show_sql=true? 是否有一个Ibatis设置来查看生成的SQL,就像Hibernate如何显示show_sql = true一样?

thanks 谢谢

是的,打开它的日志记录级别

You could try p6spy . 你可以试试p6spy

This is not exactly a Ibatis property setting to view the generated SQLs. 这不正是一个ibatis的属性设置为查看生成的SQL。 p6spy is a kind of library you can easily plugin to your Java application. p6spy是一种可以轻松插入Java应用程序的库。

It logs you the generated sql and also resultSet (Which is great, actually). 它会记录生成的sql以及resultSet(实际上这很棒)。 I used for issue tracking in dynamic queries. 我在动态查询中用于问题跟踪。 It prints it in a log file. 它将其打印在日志文件中。

This mkyong blog may give you how-to integrate it with your Ibatis. 这个简短的博客可能会为您提供如何将其与您的Ibatis集成。 (mkyong-blog-fan :)) (mkyong-blog-fan :))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM