you can try with bellow expression in @Around
, for example :
@Pointcut("execution(* AOPviaAnnotation.Book.*(..))")
public void allMethodOfBook() {};
@Around("allMethodOfBook()")
public void logBookInfo(){
...
}
or try with ||
@Pointcut("execution(* AOPviaAnnotation.Book.add(..))")
public void addMethod() {};
@Pointcut("execution(* AOPviaAnnotation.Book.delete(..))")
public void deleteMethod() {};
@Around("addMethod() || deleteMethod()")
public void logBookInfo(){
...
}