본문 바로가기
Spring/study

Spring MVC 전체 흐름 파악하기

by avvin 2019. 5. 31.

Spring MVC 전체 흐름 파악하기



https://www.slideshare.net/hanmomhanda/spring-mvc-fullflow


(임시저장)




web.xml에 DispatcherServlet 설정돼있다.

1
2
3
4
5
6
7
8
9
    <servlet>
        <servlet-name>appServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
cs


DispatcherServlet이 참조하는 servlet-context.xml에 Controller 를 bean으로 등록

1
2
3
4
5
    </beans:bean>
    <!-- 스프링 빈을 태그로 등록하지 않고 자동으로 검색(auto scan) -->  
    <context:component-scan base-package="com.example.spring01" />
 
    </beans:beans>
cs





https://j2yes.tistory.com/entry/ApplicationContext