Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.example.demo;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
public class MyAspect {
private static final Logger LOG = LoggerFactory.getLogger(MyAspect.class);
private void everythingInMyApplication() {}
public void logMethodName(JoinPoint joinPoint) {"Called {}", joinPoint.getSignature().getName());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment