Reputation: 5154
I want to create a point cut using part of a method name and a wildcard, for example:
myMethodWrite()
So my idea is something like that:
@Pointcut("execution(* br.com.spring.aop.*myMethod*.*(..))")
Is something like this possible?
Upvotes: 2
Views: 1273
Reputation: 279990
Yes, it is possible. The Spring AOP documentation states
The name pattern matches the method name. You can use the
*
wildcard as all or part of a name pattern.
and gives an example
the execution of any method with a name beginning with "set":
execution(* set*(..))
Upvotes: 4