Hi Team,
I am writing a point cut expression for a method which has generic argument.
My advice not at all detected when the method ran. Here is the scenario.
package com.xyz;
class Abc {
public void method(Listlt;CompanyAccountgt; ca) { .......
}
}
calss CompanyAccount {
}I want to write audit aspect on method1() of class Abc.
Here is my xml based configuratioon.
lt;aop:configgt;
lt;aopointcut id=quot;auditpointcutquot; expression=quot;execution(* com.xyz.Abc.method1(..))quot;/gt;
lt;/aop:configgt lease let me know what extra care I need to take to intercept the audit advice.
Originally Posted by prasad_2007Hi Team,
I am writing a point cut expression for a method which has generic argument.
My advice not at all detected when the method ran. Here is the scenario.
package com.xyz;
class Abc {
public void method(Listlt;CompanyAccountgt; ca) { .......
}
}
calss CompanyAccount {
}I want to write audit aspect on method1() of class Abc.
Here is my xml based configuratioon.
lt;aop:configgt;
lt;aopointcut id=quot;auditpointcutquot; expression=quot;execution(* com.xyz.Abc.method1(..))quot;/gt;
lt;/aop:configgt lease let me know what extra care I need to take to intercept the audit advice.
Your pointcut describes the method with name method1. However, actual method name is method.
a typo error. correct one is method1()
Originally Posted by prasad_2007a typo error. correct one is method1()
Pointcut is ok for me. So, you say that your aspect doesn't apply, right? Provide complete small standalone test-case that shows the problem then. |