执行过程
1.dispatchServlet类中的doDispatch开始执行分发
2 processedRequest = checkMultipart(request);
// Apply preHandle methods of registered interceptors.
if (mappedHandler.getInterceptors() != null) {
for (int i = 0; i < mappedHandler.getInterceptors().length; i++) {
HandlerInterceptor interceptor = mappedHandler.getInterceptors()[i];
try{
//当执行interceptor.preHandle方法的时候,SignonInterceptor类抛出异常
if (!interceptor.preHandle(processedRequest, response, mappedHandler.getHandler()))
.......................................
catch (ModelAndViewDefiningException ex) {
logger.debug("ModelAndViewDefiningException encountered", ex);
mv = ex.getModelAndView();
}
由于在 ModelAndView modelAndView = new ModelAndView("SignonForm");
在disPatchServlet中进行转发到singonForm