Spring中常见的AspectJ切点指示器
AspectJ指示器 | 功能描述 |
---|---|
args() | 通过判断目标类方法运行运行时入参对象的类型定义指定连接点 |
@args() | 通过判断目标方法运行时入参对象的类是否标注特定注解来指定连接点 |
execution() | 匹配满足某一匹配条件的目标方法的连接点 |
this() | 代理类按照类型匹配于指定类,则被代理的目标类所有连接点匹配切点 |
target() | 限制连接点匹配目标对象为指定类型的类 |
@target() | 限制连接点匹配目标对象为被特定注解标注的类 |
within() | 匹配特定域下的所有连接点 |
@within | 限制匹配特定注解标注的类的连接点 |
@annotation() | 限制匹配带有指定注解的连接点 |
来源:oschina
链接:https://my.oschina.net/u/3777515/blog/3161906