AOP basic

 

Join Point – A point of execution of a program, such as a method call or exception thrown

Pointcut – A expression that selects on one or more join points

Advice – Code to be executed at each selected join points

Aspect – A module encapsulate pointcuts and advice

Weaver – A technique by which aspect are combined with the main code

 

Advice

The below structure are a way to help you understand what advice spring provided.

aopadvices

Advice Type Modified arguments Modified return value Aborted method chain
Around Yes Yes Yes
Before Yes No Yes
AfterReturning No No Yes
After (finally) No No No
Throws No No No

 

Example: Programmatic, Declarative and Annotation

 

 

AOP basic

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.