Aspectj表达式捕获具有特定名称模式的类

时间:2016-04-05 23:36:17

标签: aspectj

我需要有关编写aspectj表达式的建议,以查找具有类名模式的所有类。

下面是我现在从主包流中捕获方法servletImplementation()的表达式。我想更多地调整它,以便仅在名称以* Log结尾的类上进行编织。有关如何做到这一点的任何建议吗?

@After("execution(* flow..servletImplementation(..))")

1 个答案:

答案 0 :(得分:0)

我认为星号通配符应该可以正常使用:

课程开始'流程':

@After("execution(* flow*.servletImplementation(..))")

名称在流程的根源包下面的Foo开头的类:

@After("execution(* flow..Foo*.servletImplementation(..))")
相关问题