import org.aspectwerkz.annotation.Aspect;
import org.aspectwerkz.annotation.Around;
@Aspect
public class LoggingAspect {
@Around("execution(* com.example.myapp.*.*(..))")
public Object logMethodExecution(ProceedingJoinPoint jp) throws Throwable {
String methodName = jp.getSignature().getName();
System.out.println("Executing method: " + methodName);
Object result = jp.proceed();
System.out.println("Method execution completed");
return result;
}
}
<bean class="org.aspectwerkz.aspectwerkzweaver.AspectWerkzLoadTimeWeaver"/>