在jsp页面上。每当查询完毕后都会在页面的最后显示:
Error 500:LocalTransaction rolled-back due to setRollbackOnly.
原因:
Connection的AutoCommit设置为false,最后却没有commit
eg:
方法中:
mothod1(){
db = new connection()
if(true){
return ;
}
db.commit();
return;}
在if中提前return 则会造成此现象