From 706dddd31af5c8b4608aabb53d1af1d7997b7504 Mon Sep 17 00:00:00 2001 From: linlei Date: Fri, 26 Apr 2024 17:55:36 +0800 Subject: [PATCH] =?UTF-8?q?Advice=E6=BA=90=E7=A0=81=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spring-aop/spring-aop-advice/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spring-aop/spring-aop-advice/README.md b/spring-aop/spring-aop-advice/README.md index ccf44a2..8da205d 100644 --- a/spring-aop/spring-aop-advice/README.md +++ b/spring-aop/spring-aop-advice/README.md @@ -8,6 +8,7 @@ - [五、子接口](#五子接口) - [六、类关系图](#六类关系图) + ### 一、基本信息 ✒️ **作者** - Lex 📝 **博客** - [掘金](https://juejin.cn/user/4251135018533068/posts) 📚 **源码地址** - [github](https://github.com/xuchengsheng/spring-reading) @@ -19,12 +20,19 @@ ### 三、主要功能 1. **定义通知逻辑** + + 允许我们定义在目标方法执行前、执行后、抛出异常时等不同连接点上执行的操作。 + 2. **支持不同类型的通知** + + `Advice`接口的实现类可以实现不同类型的通知逻辑,如前置通知、后置通知、环绕通知、异常通知等。 + 3. **与切点结合** + + `Advice`通常与切点(Pointcut)结合使用,以确定通知应该在哪些连接点上执行。 + 4. **应用于Advisor** + + `Advice`通常作为`Advisor`的一部分,与切点结合,以实现切面的逻辑。 ### 四、接口源码