开发者社区 问答 正文

Spring AOP 和 AspectJ AOP 有什么区别?

Spring AOP 和 AspectJ AOP 有什么区别?

展开
收起
7大帅 2021-10-27 21:50:15 658 分享 版权
1 条回答
写回答
取消 提交回答
  • Spring AOP 属于运行时增强,而 AspectJ 是编译时增强。 Spring AOP 基于代理(Proxying),而 AspectJ 基于字节码操作(Bytecode Manipulation)。

    Spring AOP 已经集成了 AspectJ ,AspectJ 应该算的上是 Java 生态系统中最完整的 AOP 框架了。AspectJ 相比于 Spring AOP 功能更加强大,但是 Spring AOP 相对来说更简单,

    2021-10-27 22:14:56
    赞同 展开评论