Results 1 to 2 of 2

Thread: Specifying pointcut using annotations in applicationContext.xml

  1. #1

    Default 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. #2

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •