mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-08-01 16:28:03 +08:00
更新文件:doc/system-design/frameword/spring/SpringInterviewQuestions.md :spring AOP和AspectJ AOP有什么区别,添加序号,方便记忆。
This commit is contained in:
parent
485242c794
commit
c6d832cf37
@ -93,9 +93,10 @@ AOP(Aspect-Oriented Programming:面向切面编程)能够将那些与业务无
|
||||
|
||||
### 4.2 Spring AOP 和 AspectJ AOP 有什么区别?
|
||||
|
||||
**Spring AOP 属于运行时增强,而 AspectJ 是编译时增强。** Spring AOP 基于代理(Proxying),而 AspectJ 基于字节码操作(Bytecode Manipulation)。
|
||||
1. **Spring AOP 属于运行时增强,而 AspectJ 是编译时增强。**
|
||||
2. **Spring AOP** 基于**代理(Proxying)**,而 **AspectJ** 基于**字节码操作(Bytecode Manipulation)**。
|
||||
|
||||
Spring AOP 已经集成了 AspectJ ,AspectJ 应该算的上是 Java 生态系统中最完整的 AOP 框架了。AspectJ 相比于 Spring AOP 功能更加强大,但是 Spring AOP 相对来说更简单,
|
||||
3. **Spring AOP** 已经集成了 AspectJ ,AspectJ 应该算的上是 Java 生态系统中最完整的 AOP 框架了。AspectJ 相比于 Spring AOP 功能更加强大,但是 Spring AOP 相对来说更简单,
|
||||
|
||||
如果我们的切面比较少,那么两者性能差异不大。但是,当切面太多的话,最好选择 AspectJ ,它比Spring AOP 快很多。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user