程序压测时访问量达到一定数量时程序崩溃
报错如下:
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@284019b7]
Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@284019b7]
Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@284019b7]
Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@284019b7]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@360e82bd] was not registered for synchronization because synchronization is not active
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@328cc4d4] was not registered for synchronization because synchronization is not active
从问题来看是在mybatis层出现的问题翻了下代码发现是@Transactional注解加错了位置 ,实现类上加了事务注解导致的问题
事务注解错误范例org.apache.ibatis.session.defaults.DefaultSqlSession
最新推荐文章于 2024-09-24 22:10:14 发布