@AroundInvoke public Object overrideParameters(InvocationContext invocationContext) throws Exception { if (invocationContext.getMethod().getName().equals("echoLong")) { invocationContext.setParameters(new Character[] {'z'}); } return invocationContext.proceed(); }
/** * @param context * @return * @throws Exception */ public Object around(InvocationContext context) throws Exception { String param = (String) context.getParameters()[0]; context.setParameters(new Object[] {param + "-before"}); String result = (String) context.proceed(); return result + "-after"; }