Spring Aspect Oriented Programming (AOP) is one of the key feature of Spring framework. AOP breaks down complete code into multiple modules.
AOP is similar to OOPS concept where it breaks code into multiple reusable modules.
AOP provides the capability to dynamically add module at runtime.
Cross-cutting concerns are parts of a program that rely on or must affect many other parts of the system. This is like injecting complete module(logging, cahcing, etc ) in Spring framework dynamically.
Logging, caching, security, monitoring, etc. are some of the examples cross cutting concern from AOP. At any point of time there modules can be added dynamically.
Spring AOP has interceptors which can intercept application and its methods. This is to perform some extra action at the time of property initiation, method initialization or destroy.
Below are some of the important terminologies to understand more about AOP:
Aspect is a concern which is require to implement in Spring framework or application. An application can have multiple aspects such as logging, security, monitoring.
The is a point where concern or Aspect gets plugin.
It is an actual implementation of aspect. Advice is to suggest at what moment we need to execute code, either before or after method execution.
Advice can be execute at below point of time:
Join points where an advice should be executed.
Allows you to add new methods or attributes to the existing classes.
This is an application object on which the advice will be applied.
It is a technique to make a connection in between aspects at load time, compile time or runtime.
Specialist Master (Architect) with a passion for cutting-edge technologies like AEM (Adobe Experience Manager) and a proven track record of delivering high-quality software solutions.
📝 Blogs
javadoubts.com © All rights reserved