• 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: 17309
11
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
Marshal
Posts: 53140
124
  • 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!