execution(* com.example.service.*.*(..))
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
@Aspect
public class LogAspect {
@Before("execution(* com.example.service.Service.*(..))")
public void logBefore(JoinPoint joinPoint) {
System.out.println("[" + joinPoint.getSignature().getClassName() + "." + joinPoint.getSignature().getName() + "] start");
}
}