Reputation: 982
test.core and I want an aspect around every class in that or a sub-package with the name pattern Service.
sth like this: "execution(public de.test.core..Service.*(..)" but it doesn t seem to work.
Is aspectJ even able to match to a class pattern?
Upvotes: 6
Views: 3974
Reputation: 2582
Match all methods defined in beans whose name ends with ‘Service’.
bean(*Service)
Match by Service pattern
@Pointcut("within(*..*Service)")
public void inServiceClass() {}
Upvotes: 5