Spring AOP

Spring Framework contains built-in AOP infrastructure.
It is defined in org.springframework.aop.* packages.
Following are the explanations of the Vocabulary which plays around AOP.
This will help you to understand basic concepts around AOP.

Think of this as the general feature you want to apply globally to your application
(logging, performance monitoring, exception handling, transaction management, etc).


A chunk of code that is invoked during program execution,
and is a piece of the logic for implementing your aspect.
This is the first important piece of a Spring AOP aspect implementation

A *single* location in the code where an advice should be executed (such as field access, method invocation , constructor invocation, etc.).
Spring’s built-in AOP only supports method invocation currently.

A pointcut is a set of many joinpoints where an advice should be executed.
So if, in Spring, a joinpoint is always a method invocation, then a pointcut is just a set of methods that, when called, should have advices invoked around them.
This is the second important pieces of a Spring AOP aspect implementation!

Targets/Target Objects
The objects you want to apply an aspect or set of aspects to


This is the ability to add methods to an object.
This is closely tied to, and is almost analogous to the term ‘mixins’.
It’s really just a way to make an object of type A also an object of type B.
Introduction in Spring is limited to interfaces.

Tagged with: , , , , ,
Posted in Uncategorized
2 comments on “Spring AOP
  1. Mahini says:

    Nice article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: