Spring AOP 剖析(6)
Spring AOP 的底层实现机制
?
?
?
2.? Spring AOP 中的 Pointcut
?
6.? 扩展 Pointcut
?
如何前面的 Pointcut 类型都无法满足要求,这种情况下可以扩展 Spring AOP 的 Pointcut ,给出自定义的 Pointcut。
?
要自定义 Pointcut ,Spring AOP 已经提供了相应的扩展抽象支持,我们只需要继承相应的抽象父类,然后实现或者覆写
?
方法逻辑即可。
?
Spring AOP 的 Pointcut 类型可以划分为? StaticMethodMatcherPointcut 和 DynamicMethodMatcherPointcut
?
自定义 Pointcut 只需要在这两个抽象类的基础上实现相应子类即可。
?
?

a. StaticMethodMatcherPointcut
?
??
?
?
?