Announcement Announcement Module
Collapse
No announcement yet.
Spring pointcut definition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring pointcut definition

    I'm trying to write some transaction advice based on the Spring documentation, like this:
    Code:
     <aop:config>  
     <aop:advisor pointcut="com.xyz.someapp.SystemArchitecture.businessService()" advice-ref="tx-advice"/>  
     </aop:config>

    Code:
     <tx:advice id="tx-advice">  
     <tx:attributes>  
     <tx:method name="*" propagation="REQUIRED"/>  
     </tx:attributes>  
     </tx:advice>
    where I want my pointcut to be based on @Service and @Repository annotations, like this:
    Code:
    pointcut="@within(org.springframework.stereotype.Service)"
    but I can't get it to work. What am I doing wrong?

  • #2
    The configuration you have should work. You need to provide more details.
    Also, please note that we are currently in the process of moving to stackoverflow.com for our forums. If you're still having this issue please consider asking it again at http://stackoverflow.com using the #spring tag and someone should be able to help you. Thanks!

    Comment

    Working...
    X