[Spring] Spring Run 순서

유존돌돌이·2022년 2월 14일
0

Spring

목록 보기
14/26
post-thumbnail

1) web.xml Load
2) Servlet Container 생성
3) ContextLoaderListenser Load

  • root-context.xml (applicationContext.xml) 읽는다.
  • 여기서는 대부분 시스템 기동후 한번만 읽어도 되는 DBMS Connection 정보같은 것을 읽음

4) Spring Container(Root) 기동 (ServiceImpl, DAO, VO)

  • ContextLoaderListener에서 읽은 DB와 관련된 컨테이너로 DB정보를 이미 읽었기 때문에 사용한다.
  • 여기서 IoC

5) 톰캣 기동 완료
6) Request 들어옴
7) DistpatcherServlet 의 FrontController 패턴으로 IOC를 통해 메모리에 올라가 있는 자원에 요청을 보낸다.
8) Controller에서는 처리하고 리턴값이 Data(JSON)(Restcontroller)인지 Html(Controller)에 따라 Response해준다

0개의 댓글