spring AOP 默认对RuntimeException()异常或是其子类进行事务回滚,也就是说 事务回滚:throw new RuntimeException("xxxxxxxxxxxx"); 事物不回滚:throw new Exception("xxxxxxxxxxxx"); 那么,如何在抛出Exception或者自定义异常时,事务也进行回滚呢?有以下几种方案: 1.在捕获到异常或者显示的抛出 RuntimeException 2.手动回滚----在捕获到异…
在一个项目中发现spring的事务无法回滚. DEBUG: org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@49f9ce55] was not registered for synchronization because synchronization is not active DEBUG: org.mybatis.spring.trans…