Inversion of Control ("제어의 역전")

프로그램의 제어 흐름을 직접 제어하는 것이 아니라 외부에서 관리하는 것을 제어의 역전이라 한다.

IoC Container, DI Container

Spring Container

//스프링 컨테이너 생성
val applicationContetxt: ApplicationContext = AnnotationConfigApplicationContext(AppConfig.class);

Spring Container 생성 과정

  1. 스프링 컨테이너 생성

    Untitled

  2. 스프링 빈 등록

    Untitled

  3. 스프링 빈 의존 관계 설정 - 준비

    Untitled

  4. 스프링 빈 의존 관계 설정 - 완료

    Untitled