在hibernate.cfg.xml的配置中有一个是用来显示sql语句的:
<property name="hibernate.show_sql">true</property>