No Hibernate Session bound to thread, and configuration

3/3/2017来源:C/C++教程人气:5425

sql语句查询报错: Caused by: org.hibernate.HibernateException: No Hibernate session bound to thread, and configuration does not allow creation of non-transactional one here

在service类中的方法名上加上注解: @Transactional