拦截器执行顺序及查看方法

在DispatcherServlet.doDispatch 方法中找到 

	if (!mappedHandler.applyPreHandle(processedRequest, response)) {
					return;
				}

  然后断点进入 applyPreHandle方法,其中interceptors是当前所有要过的拦截器,每个拦截器都会过一遍其中的preHandle方法,然后根据preHandle的返回结果(bool 值),true通过,false则不向下走(即到不了具体url映射的controller)

原文地址:https://www.cnblogs.com/falcon-fei/p/14663745.html