首先,你可以使用
JoinPoint#getArgs()返回的方法,其中
Object[]包含建议方法的所有参数。你可能需要进行一些转换,具体取决于你想对它们进行什么处理。
其次,可以args像这样使用切入点表达式:
// use '..' in the args expression if you have zero or more parameters at that point@Before("execution(* com.mkyong.customer.bo.CustomerBo.addCustomer(..)) && args(yourString,..)")那么你的方法可以改为
public void logBefore(JoinPoint joinPoint, String yourString)



