ApplicationContext 을 통한 빈 생성 및 조회


ApplicationContext 을 통한 빈 생성 및 조회

spring boot 에서 #application #Context 가 빈 들을 관리하는 주체입니다. 그리고 spring boot 에서는 #annotation 기반으로 빈 들을 생성합니다. 그래서 spring boot 의 ApplicationContextFactory 에 대해 디버그를 해보면 아래처럼 AnnotationConfigServletWebServerApplicationContext 가 실제 application context 가 됩니다. 이름에서 알수 있듯이 어노테이션 기반으로 빈들을 생성, 조회할수 있게 해주고, 서블릿 웹서버에 특화된 application context 라는 뜻입니다. 빈 관리에 초점을 두기 위해 AnnotationConfigServletWebServerApplicationContext 에서 웹서버쪽 기능을 뺀 어노테이션 기반 application context 의 기능에 대해 알아보겠습니다. AnnotationConfigApplicationContext ...


#annotation #application #Context

원문링크 : ApplicationContext 을 통한 빈 생성 및 조회