InterceptorTest类:

public class InterceptorTest implements HandlerInterceptor{

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
                             Object arg2) throws Exception {
        //XXXXXXXXXXXXXXXXXXXXXX
        return true;
    }

}

这样,所有的 mvc:mapping里面的请求,都会被拦截。

你可能感兴趣的:()