This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Needs help for a simple AoP application with Spring
posted 9 years ago
This is my very first time to use Spring. I'm having trouble in my AoP implementation. What I�m doing is simple: one interface called Knight with one method getMyFavouratePizza(), the implementation of this interface is KnightImpletation. To feel Spring's AoP, I am going to add a simple logging feature to the getMyFavouratePizza() method by AoP, therefore, I use MethodBeforeAdvice interface here. But the result is frustrating. It seems that the AoP has never been invoked by Spring. The following is my xml configuration file: (note: I'm using NameMatchMethodPointcut for the PointCut, but when I change to RegexpMethodPointcutAdvisor, it's the same. Nothing happens.)
Just wondering if miss anything here. Or could anyone help me out?