Hibernate provides SQL logging out of the box, but such logging only shows prepared statements, and not the actual SQL queries sent to the database. It also does not log the execution time of each query, which is useful for performance troubleshootin
今天在项目运行过程中,一直报一个org.hibernate.exception.GenericJDBCException: could not insert 异常,Root Cause是IBM DB2 ErrorCode=-180,sqlstate=22007,经过Google,发现这个错误的原因是因为Timestamp的格式不规范导致,但是具体是哪一项,却不太清楚,如果能够打印出导致问题的SQL语句,那么对于这类问题的定位就会非常容易了. 在Hibernate的配置文件hibernate.c
http://java.dzone.com/articles/performance-tuning For most typical Spring/Hibernate enterprise applications, the application performance depends almost entirely on the performance of it's persistence layer. This post will go over how to confirm that