Spring-第三章:AOP(面向切面编程)

三、AOP(面向切面编程)

1、AOP & 代理模式

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

2、动态代理:JDK动态代理和CGLIB技术

2.1 jdk动态代理

image
image
image
image
image
image
image

2.2 cglib技术

image

2.3 AOP原理

image

2.4 案例

image
image
image
image
image
image
image

3、Spring AOP 1.x配置

3.1 Spring AOP的配置方式

image
image

3.2 Spring AOP 1.x

image
image
image
image
image
image
image
image
image
image

(1)前置通知

image
image
image
image
image
image
image
image

(2)后置通知

image
image
image
image
image

(3)环绕通知

image
image
image
image
image
image
image
image
image
image
image

(4)异常通知

image
image
image
image
image
image
image
image
image
image

(5)练习

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

4、Spring AOP 2.x配置

image
image
image
image

4.1 AspectJ表达式

(1) within

image
image
image
image
image
不用再进行第四步骤:配置代理
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

(2) execution

image
image
image
image
image
image
image
image
image
image

posted @ 2023-12-14 18:48  "贼*.猫"贼*.帅`  阅读(3)  评论(0编辑  收藏  举报