Announcement Announcement Module
No announcement yet.
AOP:CONFIG & Interceptor Issue Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AOP:CONFIG & Interceptor Issue


    I'm having a very odd problem and I can't figure out what it is. I have a series of services, whose interfaces all extend from the same abstract, base interface. This base interface contains the normal CRUD methods.

    I am using the <aop:config> tags to apply my MethodSecurityInterceptor to all the services in my application. Here's the tags I'm using:

        <aop:pointcut id="myServiceMethods" expression="execution(* *..*Service*.*(..))"/>
        <aop:advisor advice-ref="mySecurityInterceptor" pointcut-ref="myServiceMethods"/>    	
    My thought was that this configuration would call the MethodSecurityInterceptor before each method in my service classes. Unfortunately that's not what's happening. Instead, only those methods that are explicitly defined in my interfaces have the security check preformed. Those methods that are inherited from the abstract base class (the CRUD) methods do not have any security intercept called.

    Has anyone else run into this? Any help would be greatly appreciated.


  • #2
    Can you post more code details about your interfaces and classes ?


    • #3
      I managed to get it working late yesterday using an annotation instead of the pattern matching. If I have time I'll circle back and see if we can't solve why the pattern didn't work.