Skip to main content

Posts

Showing posts with the label pointcuts

Spring boot Aspect Oriented Programming

What is AOP AOP stands for Aspect Oriented Programming. It is mainly used to implement the Cross-Cutting concerns in applications. These are used to reduce the mix of the business logic from the NFR (Non Functional Requirements) like logging, performance monitoring, validations etc. Also, these "Aspects" can be [should be] generalized and be located in a common library or package so that it can be easily upgraded / patched. Further, these Aspects are to be implemented without bringing-in these Aspects into every service or business logic layer so that they can be less invasive and like autowired to get the job done without being omni-present. Spring AOP helps us achieve this model by bringing in the support for the Aspects and help us wire these aspects at places where required. Core Terms / Concepts Aspect This is the cross cutting concern like logging / time measurement / validation etc. Join Point The method execution. (Example: Executing a service method like CustomerServ