AOP - Sudipta13samanta/Spring GitHub Wiki

AOP concepts Pointcut: An expression that selects one or more Join Points Join Point: A point in the execution of a program such as a method call or exception thrown Advice: Code to be executed at each selected Join Point Aspect: A module that encapsulates pointcuts and advice Weaving: Technique by which aspects are combined with main code Introduction: Spring AOP allows to introduce new interfaces (and a corresponding application) to any object advises. Target Object: An object is assisted by one or more respects. Also known as the object advised. AOP Proxy: AOP proxy is an object used to perform the contract area. This object is created by the AOP framework. In Spring AOP proxy is part of JDK dynamic proxy or proxy CGLIB.

What is the difference between concern and cross-cutting concern in Spring AOP? Concern is behavior which we want to have in a module of an application. Concern may be defined as a functionality we want to implement to solve a specific business problem. E.g. in any eCommerce application different concerns (or modules) may be inventory management, shipping management, user management etc.

Cross-cutting concern is a concern which is applicable throughout the application (or more than one module). e.g. logging , security and data transfer are the concerns which are needed in almost every module of an application, hence they are termed as cross-cutting concerns.