Setting the hibernate.show_sql
to true
tells hibernate to Write all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL
to debug.
So even if you set this property to false
, make sure that you don't have the following category defined (or configured to use a console appender):
log4j.logger.org.hibernate.SQL=DEBUG
Also, make sure that you don't set the hibernate.show_sql
programmatically to true when instancing your Configuration
object. Hunt something like this:
Configuration cfg = new Configuration().configure().
.setProperty("hibernate.show_sql", "true");
Note that the setProperty(String propertyName, String value)
takes as first parameter the full name of a configuration property i.e. hibernate.show_sql
, not just show_sql
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…