Wednesday, 14 August 2013

Spring AOP with different args

Spring AOP with different args

My advice method accepts an object parameter Foo, but the point cut method
also accepts an object parameter Bar.
In the point cut method, there are two variables that are part of the Foo
object needed to be passed into advice method.
How can I implement this? Thanks in advance.
pointcut method:
aPointCuntMethod(Bar bar){
// These two params needed to be used to construct Foo objcet and pass
it to the advice method
String attr1;
String attr2;
}
Foo object:
Class Foo {
String attr1;
String attr2;
}
advice method:
anAdviceMethod(Foo foo);

No comments:

Post a Comment