출처 : https://animal-park.tistory.com/91
root-context.xml와 servlet-context.xml는 두 파일 모두 객체(bean)를 정의한다는 공통점이 있습니다.
root-context.xml 는
-jsp와 관련이 없는 객체(bean)를 설정해줍니다. 아래 그림과 같이(service, repository)
-비즈니스 로직을 위한 설정입니다.
servlet-context.xml 는
-jsp와 관련 있는 객체(bean)를 설정해줍니다. (controller, MultipartResolver(파일 업로드), Interceptor(로그인) 등),
-URI와 관련 설정을 담는 클래스는 servlet-context.xml에 들어가야 합니다.
-WEB Application에서 Client의 요청을 받기 위한 설정입니다.
- 클라이언트의 요청을 처리하기 위한 view(uri) 관련 설정
'Spring > study' 카테고리의 다른 글
spring 20강 게시판 만들기1(목록, 글쓰기) (0) | 2019.07.03 |
---|---|
spring 19강 Smart Editor(CKEditor, SummerNote) (0) | 2019.07.03 |
spring 17강 드래그앤드롭, ajax 방식의 파일업로드 (0) | 2019.07.01 |
REST API (이후에 다시 정리) (0) | 2019.07.01 |
spring 16강 자바스크립트 난독화, Proguard를 이용한 자바 코드 난독화 (0) | 2019.07.01 |