Creating a new SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4e872071] was not registered for synchronization because synchronization is not active
was not registered for synchronization because synchronization is not active
报错如下:Creating a new SqlSession[org.apache.ibatis.session.defaults.DefaultSqlSession@4e872071] was not registered for synchronization because synchronization is not active再写树形菜单时,因为要根据父级id查询两边,报了事务关闭的错误controller层:mapper层:解决方法:在mapper层中的方法参数前加上注解@