在hibernate.cfg.xml文件中增加show_sql属性。 在hibernate.cfg.xml文件中增加show_sql属性。 <property name="show_sql">true</property> 这样可以在开发过程中看到hibernate生成的sql语句,方便调试。