Spring 事务回滚

try{
 insert(user1);
 delete(user3);//抛异常(不会回滚),到catch
}catch(Exception){
 insert(user2);
 throw new RuntimeException("1");//有异常全部回滚
}

posted on 2015-12-30 18:13  杭州糊涂虫  阅读(96)  评论(0)    收藏  举报

导航