dispatcher-servlet 이란 ?
클라이언트의 요청이 Server로 들어왔을 때, 그 요청을 제일 먼저 받아들이는 것이 
Spring에서 정의한 FrontController다. Dispatcher-servlet은 이 ForntController다.
 
Dispatcher-servlet은 받아들인 클라이언트의 요청의 공통작업을 처리한 후, 
핸들러 설정을 통해 세부 작업을 위한 Controller로 작업을 넘겨준다.
 
다음은 Dispathcer-servlet 소스를 보자
| 
| 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"         xmlns:context="http://www.springframework.org/schema/context"         xmlns:mvc="http://www.springframework.org/schema/mvc"         xmlns:p="http://www.springframework.org/schema/p"         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xmlns:aop="http://www.springframework.org/schema/aop"         xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd                 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd                 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">       <context:component-scan base-package="egovframework" use-default-filters="false">         <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>         <context:include-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice"/>     </context:component-scan>           <mvc:interceptors>         <!-- controller 실행 전이나 후에 실행 될 intercepter 로직 class -->         <mvc:interceptor>             <mvc:mapping path="/**/*.do"/>             <mvc:mapping path="/**/*.ajax"/>             <bean class="aaa.aaa.aaa.Intercepter"/>         </mvc:interceptor>                <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" p:order="0"/>       <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:order="1"         p:viewClass="org.springframework.web.servlet.view.JstlView"         p:prefix="/WEB-INF/jsp/xit/" p:suffix=".jsp" />            <mvc:resources mapping="/images/**" location="/images/"/>     <mvc:resources mapping="/cheditor/**" location="/cheditor/"/>    <mvc:resources mapping="/HTML5/**" location="/HTML5/"/> </beans>   | cs |  
 
 
 | 
 
<context:component-scan> :  스프링 2.5버젼 이상부터 streotype 애노테이션(@Controller,@Service...)를 사용할 수
                                       있다.  streotype은 일반적으로 사용되는 패턴 개념이다.
 
                                       해당 태그는 애노테이션 태그를 디폴트로 스캔해준다. use-default-filters의 옵션이 
                                       false가 되면 디폴트 애노테이션들을 스캔해주지 않게 된다.
 
                                       또, 스캔을 제외하고 싶은 빈이 있다면 context:include-filter 태그를 사용하여 제외할 수
                                       있다.
<mvc:interceptors> : 해당 태그는 Interceptor의 설정 태그로,  mvc:mapping path에  설정된 경로들은 모조리                                          Interceptor클래스에게 작업을 빼앗긴다.
InternalResourceViewResolver : JSP,HTML  같이 웹 어플리케이션의 내부 자원을 이용해서 뷰를 생성하는                                                             AbstractUrlBasedView 타입의 뷰 객체를 리턴한다.
                                        p:prefix ,p:suffix 를 이용해, Controller에서 jsp를 리턴할 때 앞뒤로 붙는 값들이다.
mvc:resources  :  해당 태그의 mapping 속성을 location(${webapproot}/속성값) 속성으로 매핑시켜버리겠다는 의미의                         태그다.
                      jsp 페이지에서 link를 걸거나 스크립트 태그안의 src 속성에 url을 넣게 되면 이것이 servlet 매핑에 
                      걸려버려서 404 not found 를 뱉어내는 경우가 있다.
                      해당 문제를 사전에 예방하기 위해 resources 태그로 정적인 리소스의 매핑들은 강제로 처리해버리는
                      것이다.