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

  • AOP:CONFIG & Interceptor Issue

    Hi

    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:

    Code:
    <aop:config>
        <aop:pointcut id="myServiceMethods" expression="execution(* *..*Service*.*(..))"/>
        <aop:advisor advice-ref="mySecurityInterceptor" pointcut-ref="myServiceMethods"/>    	
    </aop:config>
    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.

    Thanks.

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

    Comment


    • #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.

      Comment

      Working...
      X