Spring AOP @before@after@around@afterreturning@afterthrowing执行顺序

public Object aop(Method method,Object object) {
    try {
        try {
            /*doAround start*/
            doBefore();
            method.invoke(object);
            /*doAround end*/
        } finally {
            doAfter();
        }
        doAfterReturning();
    } catch (Exception e) {
        doAfterThrowing();
    }
}

猜你喜欢

转载自www.cnblogs.com/shoubianxingchen/p/12546858.html