daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Feb 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Object[] args = pjp.getArgs();
  2.     MethodSignature methodSignature = (MethodSignature) pjp.getStaticPart()
  3.             .getSignature();
  4.     Method method = methodSignature.getMethod();
  5.     Annotation[][] parameterAnnotations = method.getParameterAnnotations();
  6.     StringBuilder methodArgs = new StringBuilder();
  7.     for (int argIndex = 0; argIndex < args.length; argIndex++) {
  8.         for (Annotation annotation : parameterAnnotations[argIndex]) {
  9.             if ((annotation instanceof RequestParam) || (annotation instanceof PathVariable) || (annotation instanceof RequestHeader)) {
  10.                 methodArgs.append(args[argIndex] + "|");
  11.             } else if ((annotation instanceof RequestBody)) {
  12.                 methodArgs.append(mapper.writeValueAsString(args[argIndex]) + "|");
  13.             }
  14.         }
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top