SpringAOP:Aspect、Join Point、Advice等

AOP概念

  • AspectJ: Aspect-oriented programming is a way of modularizing crosscutting concerns much like object-oriented programming is a way of modularizing common concerns.
  • Spring: Aspect-oriented Programming (AOP) complements Object-oriented Programming (OOP) by providing another way of thinking about program structure. The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. Aspects enable the modularization of concerns (such as transaction management) that cut across multiple types and objects.
  • 面向切面编程是在模块化编程中切入关注点的一种方式,就像面向对象编程是模块化编程中关注公共点的方式一样。
  • 面向方面编程(AOP)是面向对象编程(OOP)的补充,它提供了考虑程序结构的另一种方式。在OOP中模块化的关键单元是类,而在AOP中模块化的单元是方面。方面支持对跨多种类型和对象的关注点(如事务管理)进行模块化。

猜你喜欢

转载自blog.csdn.net/ShallDid/article/details/112719957