Announcement Announcement Module
Collapse
No announcement yet.
Sending a WebRequest to an interceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending a WebRequest to an interceptor

    Hi all

    I have this AOP configuration:
    Code:
    <aop:config>
       	<aop:aspect id="securityAspect" ref="securityInterceptor">
          	<aop:pointcut id="securityPointCut" expression="execution(* net.myapp.web..*.*(..))"/>
          	<aop:before pointcut-ref="securityPointCut" method="intercept" />
       	</aop:aspect>
    </aop:config>
    Here's my interceptor class:
    Code:
    public String intercept(WebRequest request)
    {
          System.out.println(request.toString());
          return "";
    }
    Example of typical intercepted method:
    Code:
    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView prepareView(WebRequest request) 
    {
    	//do stuff
    }
    When I run the code I get the following error:
    error at ::0 formal unbound in pointcut

    How do I configure Spring AOP so that it sends the WebRequest instance from the prepareView method to the interceptor?

    Thanks

  • #2
    found the answer..

    http://forum.springframework.org/sho...ht=request+aop

    Comment

    Working...
    X