3.1 소개
IoC의 핵심 패키지는 아래의 패키지에 모여있다.
1. org.springframework.beans
2. org.springframework.context
<<interface>> BeanFactory
오브젝트 관리의 총책임을 맡고 있다.
<<infterface>> ApplicationContext
BeanFactory 인터페이스를 기반으로 Spring의 AOP에 보다 쉽게 통합을 지원하며, 국제화등의 메세지 지원, 이벤트 프로페이제이션(event propagation), 웹 어플리케이션을 위한 WebApplicationContext 와 같은 어플리케이션-레이어 컨텍스트를 지원한다.
쉽게 말해서, BeanFactory는 프레임워크의 설정과 기본 기능을 지원하는 반면에, ApplicationContext는 보다 엔터프라이즈 중심적인 기능을 추가하였다. BeanFactory의 수퍼셋이므로 BeanFactory가 제공하는 기능을 모두 가진다.
BeanFactory 와 ApplicationContext 중에 어느걸 고를까? BeanFactory는 기본이고, ApplicationContext는 BeanFactory 보다 엔터프라이즈 기능이 추가되었다. BeanFactory 기능은 그대로 가지고 있기에, BeanFactory 보다는 ApplicationContext가 선호되지 않을까?
반응형
'Spring framework > Spring' 카테고리의 다른 글
Spring framework 레퍼런스 (번역주소) (0) | 2010.05.07 |
---|---|
Spring에서의 Hibernate (0) | 2010.05.07 |
빈 생성 모드 - singleton vs non-singleton (0) | 2010.05.07 |
constructor injection vs. setter injection (0) | 2010.05.07 |
SpringSource dm Server 1.0 설치 (0) | 2010.05.07 |
최근댓글