Announcement Announcement Module
Collapse
No announcement yet.
Specifying pointcut using annotations in applicationContext.xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Specifying pointcut using annotations in applicationContext.xml

    I am trying to create a pointcut which matches all methods annotated with a particular annotation in a particular class. I just can't seem to get this correct when creating this in my applicationContext in the aop:Config. Any help with this would be appreciated


    Code:
    <aop:config>                                                    
    <aop:advisor advice-ref="txAdvice" pointcut="execution(* com.company.app..service.*.*(..))"/>
    </aop:config>
    this works but if I specify an annotation on the pointcut it doesn't match
    Code:
    <aop:config>                                                    
    <aop:advisor advice-ref="txAdvice" pointcut="execution(@com.company.Annotation * com.company.app..service.*.*(..))"/>
    </aop:config>
    The annotation is setup to have runtime retention and the target is method. Again any help would really be appreciated.

  • #2
    I was able to get this working, the issue was on my end, please ignore.

    Comment

    Working...
    X