We learned about pointcut in terms of AOP. Now let's see what we should take care of when using pointcut:
- Spring with AspectJ processes the pointcuts during compilation and tries to match and optimize matching performance. However, examining code and matching (statically or dynamically) would be a costly process. So, for optimal performance, think twice about what we want to achieve and narrow down our search or matching criteria as much as possible.
- All the designators we learned earlier in this chapter are divided into three categories:
- Method signature pattern: execution, get, set, call, handler
- Type signature pattern: within, withincode
- Contextual signature pattern: this, target, @annotation
- In order to achieve ...