org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
怎么解決.....
怎么解決.....
2016-08-23
老師這里有一個問題個別同學可能會遇到,在建立事物后運行junit時候出錯,錯誤為Session is closed,會話被關閉的,經過查找問題發現在使用getCurrentSession的時候不能保證這個會話就是打開開放的,需要改為openSession();
Session session = this.getSessionFactory().openSession();
session.beginTransaction();
Session session = this.getSessionFactory().openSession();
session.beginTransaction();
2016-08-21