Ich bin mit Spring AOP und haben unter Aspekt: Methodenargumente mit Spring AOP abrufen?
@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 Aspekt fängt addCustomer
Ausführung der Methode. addCustomer
Methode nimmt String als Eingabe. Aber ich muss Eingang protokollieren, der an addCustomer
Methode innerhalb logBefore
Methode übergeben wird.
Ist es möglich, dies zu tun?
Was die Methodensignatur von 'AddCustomer ist (..) '? –