• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic