Spring AOP concepts have their own functionalities such as below.
It is about where the advice is to be applied.
Advice is a service provider,types of advice are as follows.
Advice |
Functionality |
Before Advice |
Execute advicer code before method is invoked. |
After Advice |
Run advice after the method execution regardless of its outcome. |
Around Advice |
Before and after method execution. |
After-Returning Advice |
Executes when method executs successfully. |
After-Throwing Advice |
When method throws an exception during the execution. |
Point cut is a point or condition to execute aspect of business.
It adds methods and attributes to previous class.
Aspect is a service, AOP will help to add this service to business logic.
It is called as proxied object because AOP will be implemented at dynamic proxies and it is advised (point cut+advice) by one or more services (aspects).
An interceptor is a service (aspect), it consists one service provider (advice).
The proxy is also called weaver, proxy combines both the business logic and its services, finally it delivers a proxy object.
It is a procedure of jointing aspects with another object to create an advised object at run time, compile time, load time.