@@ -0,0 +1,1556 @@
+package org.treeleaf.web.spring.interceptor;%0A%0Aimport org.springframework.web.servlet.HandlerInterceptor;%0Aimport org.springframework.web.servlet.ModelAndView;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * %E6%8F%90%E4%BE%9B%E8%81%9A%E5%90%88%E8%AF%BB%E4%B8%AAHandlerInterceptor%E7%9A%84%E6%96%B9%E6%B3%95%0A * %3Cp%3E%0A * Created by yaoshuhong on 2015/5/5.%0A */%0Apublic class MultipleHandlerInerceptor implements HandlerInterceptor %7B%0A%0A    private List%3CHandlerInterceptor%3E handlers = new ArrayList%3C%3E();%0A%0A    @Override%0A    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception %7B%0A%0A        for (HandlerInterceptor item : handlers) %7B%0A            if (!item.preHandle(request, response, handler)) %7B%0A                return false;%0A            %7D%0A        %7D%0A%0A        return true;%0A    %7D%0A%0A    @Override%0A    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception %7B%0A        for (HandlerInterceptor item : handlers) %7B%0A            item.postHandle(request, response, handler, modelAndView);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception %7B%0A        for (HandlerInterceptor item : handlers) %7B%0A            item.afterCompletion(request, response, handler, ex);%0A        %7D%0A    %7D%0A%0A    public void setHandlers(List%3CHandlerInterceptor%3E handlers) %7B%0A        this.handlers = handlers;%0A    %7D%0A%7D%0A

添加支持多个spring mvc拦截器的适配类