介绍
一个方法被一个aspect类拦截时的执行顺序如下
@Around->@Before->方法执行->@Around->@After->@AfterReturning/@AfterThrowing
当方法正常结束时,执行@AfterReturning。方法异常结束时,执行@AfterThrowing。两者不会同时执行哈
参考博客
[1]https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#aop-ataspectj-advice-ordering
[2]https://www.cnblogs.com/csyh/articles/13246574.html
好文
[3]https://juejin.cn/post/6844903975578238984
[4]https://blog.csdn.net/nickyyu/article/details/105027203
[5]https://zhuanlan.zhihu.com/p/373973937
[6]https://www.cnblogs.com/tomakemyself/p/14131421.html
[7]https://my.oschina.net/u/2377110/blog/1536991