Bravo
Bravo

Reputation: 1139

Spring AOP expression - class that contains String

I want to write an AOP expression that will fetch all classes which have a certain string in their names. Assume I have the following classes: ProductRestController, ProductSoapController, ProductService. I would like to write an expression that will fetch classes that have Controller in their names. Is this possible with Spring AOP?

Upvotes: 1

Views: 323

Answers (1)

GUISSOUMA Issam
GUISSOUMA Issam

Reputation: 2582

Match all methods defined in beans whose name ends with ‘Controller’.

bean(*Controller)

Upvotes: 1

Related Questions