Please suggest some tutorial/cheatsheet for learning pointcut expression.
Pointcut is an expression language of spring AOP which is basically used to match the target methods to apply the advice. It has two parts ,one is the method signature comprising of method name and parameters. Other one is the pointcut expression which determines exactly which method we are applying the advice to.
@target – pointcut expression for matching to join points where the class of the executing object has an annotation of the given type. @args – pointcut expression for matching to join points where the runtime type of the actual arguments passed have annotations of the given type.
The AspectJ programmers guide has plenty examples, looks straightforward.
AspectJ in Action is also a great source of information on AOP and AspectJ.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With