【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”
@JFinal 你好,想跟你请教个问题:
@Before(Tx.class)
public void insertUser(User xmlUser) throws Exception{
userOrg.update();
boolean success = user.update();
if(!success) throw new Exception("更新失败!");
userOrg.save();
}
以上代码定时在后台线程运行,报错扔出异常不能回滚,@Before(Tx.class)必须在action中么?后台线程运行代码怎么做事务回滚?