Announcement Announcement Module
Collapse
No announcement yet.
Can't advice package and under packages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't advice package and under packages

    Hello all,
    My aspect can advice services in the package com.xyz.service. The pointcut is defined with "execution(* com.xyz.service..*.*(..))".

    How if I want my aspect advice all classes in all under packages of the package com.xyz ?

    The pointcut "execution(* com.xyz..*.*(..))" is not working

    Please help,
    djemgo

  • #2
    that should work. I have bunch of them defined just like that, "execution(* com.xxxx.dao..*.*(..))", "execution(* com.xxxx.service..*.*(..))" ... maybe something else is up?...

    Comment


    • #3
      Can't advice package and under packages

      Hi bdangubic,
      thanks a lot for the answer. Could you write:
      "execution(* com..*.*(..))", so that the aspect should advice all in '*xxx' ?

      thanks

      Comment


      • #4
        looks right and works for me, I just tested it with this pointcut

        public pointcut allUnderCom() : within(com..*);

        works as expected...

        Comment


        • #5
          Hi bdangubic,
          thanks a lot for the time you've spent replying. You are wrigt it's working. I didn't set the interfaces in the correct package.

          Comment

          Working...
          X