Results 1 to 3 of 3

Thread: how do I use the aop:advisor to for the before advice type

  1. #1

    Default how do I use the aop:advisor to for the before advice type

    Hi,

    All the examples and code I saw would trigger the invoke() method of the class. I failed to find any example of invoking the before() method.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Implement the MethodBeforeAdvice interface and it will do that automatically.

    However with a MethodInterceptor you can achieve the same results. Simple execute your additional stuff before calling the method.proceed().
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jul 2007
    Location
    Juan Les Pins, France
    Posts
    42

    Default

    You can also refer to Mark Fisher’s Blog which shows a nice example for logging using aop:aspect style before advice.

    -Nikhil

Posting Permissions

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