在applicationContext.xml中的<property name=”hibernateProperties”>*********<property name=”hibernateProperties”>的地方加入开关
<prop key=”hibernate.show_sql”>
true
</prop>
可以实现查询数据库里面的内容时在显示栏显示SQL语句
即代码如下
<property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.SQLServerDialect </prop> <prop key="hibernate.show_sql"> true </prop> </props> <property name="hibernateProperties">