如下,funcA调用funcB,由于自调用,所以funcB上的 @Transactional是无效的我的理解:funcA在事务中,而funcB是funcA内部的一部分,所以funcB处于funcA所在的事务内但是事实好像不是如此,为何?public class MyServiceImpl{
@Transactional
funcA(){
sql_insert(a);
funcB();
} @Transactional
funcB(){
sql_insert(b);
}
}
添加回答
举报
0/150
提交
取消