springmvc 프로세스 추적

 springmvc 구현 프로세스 우리에서의 DispatcherServlet에 doService 방법 찾을 전면 컨트롤러 서블릿 방법에서 상속 :
 this.doDispatch (요청 응답)
파라미터들을 정의하는, 주된 일이다 :
 MV = ha.handle (processedRequest 응답, mappedHandler .getHandler ()) 실질적 제어기를 호출하는 메소드가 실행된다 RequestMappingHandlerAdapter (구현 클래스 HandlerAdapter) HandlerInternal 인 방법 handleInternal을 진행한다 :
보호의 ModelAndView handleInternal (HttpServletRequest의 요청에 응답 HttpServletResponse를, HandlerMethod HandlerMethod)는 {예외를 발생
        this.checkRequest (요청)
        의 ModelAndView MAV,
        IF (this.synchronizeOnSession) {
            의 HttpSession = Request.getSession 세션 (false로),
            IF (! 세션 = NULL) {
                개체 = 뮤텍스 (세션) WebUtils.getSessionMutex;
                동기 (뮤텍스) {
                    MAV = this.invokeHandlerMethod (요청, 응답, handlerMethod);
                }
            } 또 {
                MAV = this.invokeHandlerMethod (요청, 응답, handlerMethod);
            }
        } 또 {
            MAV = this.invokeHandlerMethod (요청, 응답, handlerMethod);
        }

        경우 (response.containsHeader ( "캐시 제어")!) {
            경우 (this.getSessionAttributesHandler (handlerMethod) .hasSessionAttributes ()) {
                this.applyCacheSeconds (응답 this.cacheSecondsForSessionAttributeHandlers);
            사용한다} else {
                this.prepareResponse (대응);
            }
        }

        리턴 MAV는;
    }
이 시점에서이 MAV이다 = this.invokeHandlerMethod (요청, 응답, handlerMethod) invocableMethod.invokeAndHandle의 클래스에있어서 실제로 이때 invokeAndHandle ServletInvocableHandlerMethod 클래스 방법에서 수행되는 상기 (WebRequest를, mavContainer 새로운 객체가 [0]); 구문 우리는 방법에 의해 수행 된 관계를 볼 수있는
 개체에 ReturnValue = this.invokeForRequest (WebRequest를, mavContainer , providedArgs를) invokeForRequest 방법 행한다 InvocableHandlerMethod 클래스
오브젝트에 ReturnValue = this.doInvoke (인수)이 클래스의 구현 doInvoke
this.getBridgedMethod ()는 (this.getBean ()를 인수)를 호출 리턴 ;. 그것은라는 반사를 갖는다.

 이러한에서 우리는 트랙 브라우저가 프로세서의 DispatcherServlet 매퍼 RequestMappingHandlerAdapter 처리 제어 방법 InvocableHandlerMethod 실행 방법 어댑터 반영 InvocableHandlerMethod GET modelandvew에 와서 요청을 보냅니다 알 수

추천

출처www.cnblogs.com/xyhx/p/11441712.html