aop拦截器没拦住,求教了
xml:
<bean id="chkLoginAdvice" class="com.zjm.study.advice.chkLoginAdvice" /> <aop:config> <aop:advisor pointcut="execution(* com.zjm.struts.action.LoginAction.login(..))" advice-ref="chkLoginAdvice" /> </aop:config>
package com.zjm.struts.action;public class LoginAction extends DispatchAction { //分发action public ActionForward login(ActionMapping mapping............) { //......... }}
package com.zjm.study.advice;public class chkLoginAdvice implements MethodInterceptor { public Object invoke(MethodInvocation arg0) throws Throwable { System.out.println("测试拦截"); //这句没打印出来,没拦住..... return null; }}