midSpring
What is Spring AOP (Aspect-Oriented Programming)?
Updated May 17, 2026
Short answer
AOP allows separation of cross-cutting concerns like logging, security, and transactions.
Deep explanation
Spring AOP uses proxies to intercept method calls and apply additional behavior before, after, or around method execution. It defines aspects, join points, pointcuts, and advices to modularize cross-cutting logic.
Real-world example
Logging execution time of all service methods in enterprise applications.
Common mistakes
- Confusing AOP with full bytecode weaving frameworks like AspectJ.
Follow-up questions
- What is a pointcut?
- What is proxy-based AOP?