Hi all
I am trying to intercept all calls to methods within net.myapp.web with
but none of them are intercepted. I am specifically looking to intercept net.myapp.web.Index which looks like this:Code:<bean id="securityInterceptor" class="net.myapp.web.SecurityInterceptor" /> <aop:config> <aop:aspect id="securityAspect" ref="securityInterceptor"> <aop:pointcut id="securityPointCut" expression="within(net.myapp.web..*)"/> <aop:before pointcut-ref="securityPointCut" method="intercept" /> </aop:aspect> </aop:config>
but the prepareView method is never intercepted, even though it does run.Code:@Controller package net.myapp.web.page; @RequestMapping("/index.html") public class Index extends ControllerSupport { @RequestMapping(method = RequestMethod.GET) public ModelAndView prepareView() { //do stuff } }
If I change my pointcut expression to
then the intercept method (which only prints out a message) will run a bunch of times so there's nothing wrong with the basic setup.Code:<aop:pointcut id="securityPointCut" expression="execution(* *(..))"/>
Any ideas why my controller method isn't being intercepted?


Reply With Quote