<aop: aspectj-autoproxyproxy-target-class="true" />
安装tcc的官网例子
@Override
@Compensable(confirmMethod = "confirmMakePayment", cancelMethod = "cancelMakePayment")
@Aop(TransAop.READ_COMMITTED)
public void Test() {
memberService.updateMember(null,1);
// int i = 5 / 0;
log.info("========================确认订单");
}
/**
* 确认付款
*/
@Aop(TransAop.READ_COMMITTED)
public void confirmMakePayment() {
log.info("========================确认付款");
}
/**
* 取消付款
*/
@Aop(TransAop.READ_COMMITTED)
public void cancelMakePayment() {
log.info("========================取消付款");
}
但是aop貌似没有生效