最终通知 @After

该通知有点类似于finally代码块,只要应用了无论什么情况下都会执行

/**
 * 无论什么情况下都会执行的方法
 * joinPoint 参数
 */
@After("execution(* com.zejian.spring.springAop.dao.UserDao.*User(..))")
public void after(JoinPoint joinPoint) {
    System.out.println("最终通知....");
}

results matching ""

    No results matching ""