`

spring 面向切面编程

阅读更多
@Aspect
public class AspectCoupon implements Ordered {


@AfterReturning(pointcut = "execution(public * com.longtuo.server.bo.www.CustomerInfoService.saveCustomerInfo(..))", returning = "user")
public void sentRegisterCoupon(Users user) throws Exception {
}

@After("execution(public void com.longtuo.server.bo.www.LogisticsService.updateOrderStatus(..)) && args(orderInfo,status)")
public void receiveProductCoupon(OrderInfo orderInfo, String status)
throws Exception {// 订单状态为收货发送礼券
}
}

具体请看:http://bbs.javawind.net/help/html/spring_ref_2.0/html/aop.html
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics