在hibernate.cfg.xml文件中增加show_sql属性。

在hibernate.cfg.xml文件中增加show_sql属性。

<property name="show_sql">true</property>

这样可以在开发过程中看到hibernate生成的sql语句,方便调试。

posted @ 2011-11-26 17:13  天如er  阅读(304)  评论(0编辑  收藏  举报