posted 7 years ago
@Around("annotation(com.daya.java.aspect.Loggable)")
public Object myAroundAdvice(ProceedingJoinPoint proceedingJoinPoint){ // proceedingJoinPoint is mandatory
Object returnValue=null;
try {
System.out.println("Before Executon of Target method");
returnValue = proceedingJoinPoint.proceed();
System.out.println("After Executon of Target method");
} catch (Throwable e) {
System.out.println("Exception");
}
System.out.println("After Finally");
return returnValue;
}
I tried to create custom annotation using @Around I am getting below exception. Can anyone please help me out.
nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut annotation