mini-spring 学习笔记—AOP

发布时间 2023-12-08 12:53:43作者: Frodo1124

切点表达式

ClassFilter 和 MethodMatcher

这两个接口都定义了一个叫做 mathes 的方法,用于匹配

ClassFilter 接口规范了类过滤器的行为

boolean matches(Class<?> clazz);

MethodMatcher 接口规范了方法过滤器的行为

boolean matches(Method method, Class<?> targetClass);

基于 JDK 的动态代理

基于 CGLIB 的动态代理

AOP 代理工厂

几种常用的 Advice

PointcutAdvisor:Pointcut 和 Advice 的组合

动态代理融入 bean 生命周期