Exceprtion:e createQuery is not valid without active transaction; nested exception is org.hibernate.HibernateException: createQuery is not valid without active transaction

如果增加配置了current_session_context_class属性,查询的时候需要session.beginTrasaction()来开启事务

posted @ 2018-03-28 11:49  keepup~  阅读(158)  评论(0编辑  收藏  举报