A Join Point is a concept from Aspect-Oriented Programming (AOP).
A Join Point is a specific point during the execution of program code where additional behavior (called an aspect) can be inserted.
Method calls
Method executions
Field access (read/write)
Exception handling
In AOP, cross-cutting concerns (like logging, security, or transaction management) are separated from the main business logic. These concerns are applied at defined points in the program flow — the Join Points.
Pointcut: A way to specify which Join Points should be affected (e.g., "all methods starting with save
").
Advice: The actual code that runs at a Join Point (e.g., "log this method call").
Aspect: A combination of Pointcut(s) and Advice(s) — the full module that implements a cross-cutting concern.
@Before("execution(* com.example.service.*.*(..))")
public void logBeforeMethod(JoinPoint joinPoint) {
System.out.println("Calling method: " + joinPoint.getSignature().getName());
}
→ This logs a message before every method call in a specific package. The joinPoint.getSignature()
call provides details about the actual Join Point.