在做本套视频最后的添加区域与编辑区域信息时出现错误三天自己无法解决,求大神出手相救。
前面做单元测试时增删改查方法都通过了,在最后做微信前台向后台传入添加和编辑区域信息时,却无法插入和更新数据,感觉没有执行SQL语句一样,网上说是SESSION没有自动提交,搞了好久无法解决。将执行的SQL语句打印如下:
更新语句:
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4df06b50] was not registered for synchronization because synchronization is not active
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4df06b50]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@60724c05] was not registered for synchronization because synchronization is not active
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@60724c05]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@49e5780f] was not registered for synchronization because synchronization is not active
JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@6949521e [wrapping: com.mysql.jdbc.JDBC4Connection@5c813400]] will not be managed by Spring
==> Preparing: update tb_area SET area_name=?, priority=? where area_id=?
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@49e5780f]