1

I need advice on writing the aspectj expression to find all classes with the class name pattern.

Below is the expression I have now to capture the method servletImplementation() from the main package flow. I would like to tweak it more to do weaving only on the classes that has name ends with *Log. Any suggestions on how to do this?

@After("execution(* flow..servletImplementation(..))")
santosh
  • 29
  • 3
  • 12

1 Answers1

0

I think the asterisk wildcard should work just fine for you:

Classes starting 'flow':

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

Classes with names starting Foo somewhere below a root package of flow:

@After("execution(* flow..Foo*.servletImplementation(..))")
Andy Clement
  • 2,510
  • 16
  • 11