Pointcut Expressions

The way pointcuts are defined is important because it decides the method calls that will be intercepted. If we have two packages, we can define which method calls will be intercepted.

If we remove the last part of the package name, all calls will be intercepted.

Intercepting all method calls in a package

We have the following pointcut expression:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.