I am using Spring AOP and have below aspect:
@Aspect
public class LoggingAspect {
@Before("execution(* com.mkyong.customer.bo.CustomerBo.addCustomer(..))")
public void logBefore(JoinPoint joinPoint) {
System.out.println("logBefore() is running!");
System.out.println("hijacked : " + joinPoint.getSignature().getName());
System.out.println("******");
}
}
Above aspect intercepts addCustomer
method execution. addCustomer
method takes string as an input.
But I need to log input passed to addCustomer
method inside logBefore
method.
Is it possible to do so ?