Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Interceptor logs method execution and its parameters
public static void intercept(@AllArguments Object[] allArguments,
@Origin Method method) {
Logger logger = LoggerFactory.getLogger(method.getDeclaringClass());"Method {} of class {} called", method.getName(), method
for (Object argument : allArguments) {"Method {}, parameter type {}, value={}",
method.getName(), argument.getClass().getSimpleName(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment