@Pointcut("execution(* com.example.service.*.*(..))")
public void serviceMethods() {}
@Before("serviceMethods()")
public void beforeServiceMethod(JoinPoint joinPoint) {
System.out.println("Before executing service method: " + joinPoint.getSignature().getName());
}
@Aspect
public class LoggingAspect {
@Before("serviceMethods()")
public void beforeServiceMethod(JoinPoint joinPoint) {
System.out.println("Before executing service method: " + joinPoint.getSignature().getName());
}
}