user373201
user373201

Reputation: 11445

spring aop advice methods in a subclass

I want to advice a particular method in all class that extends or implements a particular interface or abstract class. How can this be achieved using spring aop 2.5.

Upvotes: 4

Views: 3387

Answers (1)

OrangeDog
OrangeDog

Reputation: 38777

Using the pointcut expression:

within(some.package.MyInterface+)

The plus (+) means "this class/interface and all subclasses/implementors".

AspectJ Subtype patterns.

Upvotes: 6

Related Questions