Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write the pointcut for a method in the inter-interface

 
pkinuk Buler
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all,

I dont' know if 'Spring' is the correct group to ask my question. I'm new to the AspectJ. I have the following code:



I'm using the Aspecj annotation to declare the pointcut. The following is my code:


However, the method pointCutTest is never called when the method executeBatch is called in its implementation class. How can i set the pointcut for the method executeBatch in the implementation of PointCutIWantToSet?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about


"execution(* com.uk.foo.*.executeBatch(..))"

or simply

execution(* executeBatch(..))

unless there are executeBatch methods elsewhere.

I also think there could be an issue with a static inner class. Personally I avoid any inner classes anywhere in my code because it always just causes more issues/problems that it resolves.

Mark
 
Campbell Ritchie
Sheriff
Pie
Posts: 48972
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pkinuk Buler wrote: . . . I dont' know if 'Spring' is the correct group to ask my question. . . .
AOP would be a better fit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic