Ich benutze Spring AOP und habe folgenden Aspekt:
@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("******");
}
}
Der obige Aspekt fängt die addCustomerAusführung der Methode ab. addCustomerMethode nimmt String als Eingabe. Aber ich muss die Eingabe protokollieren, die an die addCustomerMethode innerhalb der logBeforeMethode übergeben wurde.
Ist das möglich?
addCustomer(..)?