hibernate 配置启动报错,错误信息如下:
1 2 3 |
org.hibernate.HibernateException: No CurrentSessionContext configured! at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:540) at michael.jdbc.c3p0.C3p0HibernateExample.main(C3p0HibernateExample.java:31) |
解决办法:在配置文件:hibernate.cfg.xml 添加属性:curren[……]
近期评论