报错:Caused by: org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread
解决:service方法没有加入到事务管理器中。在方法上加注解 @Transactional(readOnly = true, rollbackFor = Exception.class)
报错:Caused by: org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread
解决:service方法没有加入到事务管理器中。在方法上加注解 @Transactional(readOnly = true, rollbackFor = Exception.class)