Results 1 to 2 of 2

Thread: AOP and Spring MVC View (extending AbstractView)

  1. #1
    Join Date
    Aug 2006
    Posts
    17

    Default AOP and Spring MVC View (extending AbstractView)

    I am using AOP successfully (@Around) on my controllers.

    For some reason, any of my views, that extend AbstractView.. I can't seem to do @Around advice on.

    specifically, I implement the method renderMergedOutputModel.

    This is a protected method.

    I use this advice:
    @Around("within(com.company.server.rpc.view.*)")

    i've tried execution advice.. naming the class/method (GsonView.renderMergedOutputModel(..)) etc etc

    Never executes that advice etc.

    ANy ideas?

    Thanks,
    Roger

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

    Default

    I suggest the forum search as similair questions have been answered numerous times.

    Short: Spring uses proxy based aop, you can only intercept external methods call, for view that is only render all other method calls are internal method calls.
    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

Posting Permissions

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