I have created a Aspect EmployeeAspect.aj
@Aspect
public aspect EmployeeAspect {
@Before("execution(* com.employee.domain.*.persist(..))")
public void doIDcheck(){
System.out.println("Called before Persist");
}
@Before("execution(* com.employee.domain.*.persist())&& args(entity)")
public void doIDcheck(EmployeeEntity entity){
System.out.println("Called before Persist with entity");
}
}
The method doIDcheck is called when I call enity .persist() It works for the doIDcheck with no arguments. But is not called with arguments added.
Thanks for any help,


Reply With Quote