Results 1 to 3 of 3

Thread: How i can intercept protected methods?

  1. #1
    Join Date
    Nov 2011
    Posts
    8

    Default How i can intercept protected methods?

    Hello, i need to intercept some protected methods of AbstractRememberMeServices class.

    How can explain me how i can intercept this type of methods? I see the spring aop documentation but dont find my answer.

    Thanks a lot

  2. #2
    Join Date
    Jun 2011
    Posts
    35

    Default

    The note in section 7.2.3.1 states.

    Due to the proxy-based nature of Spring's AOP framework, protected methods are by definition not intercepted, neither for JDK proxies (where this isn't applicable) nor for CGLIB proxies (where this is technically possible but not recommendable for AOP purposes). As a consequence, any given pointcut will be matched against public methods only!
    To intercept protected methods you need to use native AspectJ loadtime weaving.

  3. #3
    Join Date
    Nov 2011
    Posts
    8

    Default

    thanks, i will explore it

Posting Permissions

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