본문 바로가기

콩's EDUCATION/콩's SPRING

BeanFactory, ApplicationContext차이

BeanFactory factory = new XmlBeanFactory
(new ClassPathResource("coupling/applicationContext.xml"));

1. xml 파일 입력
2014. 7. 25 오전 10:22:06 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
정보: Loading XML bean definitions from class path resource [coupling/applicationContext.xml]
2. xml 파일 입력
3. LGTV 생성자
LG TV 끄기
LG TV 켜기
Volume 내리기
Volume 올리기


ApplicationContext factory2 = 
new ClassPathXmlApplicationContext("coupling/applicationContext.xml");

1. xml 파일 입력
2014. 7. 25 오전 10:16:48 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
정보: Loading XML bean definitions from class path resource [coupling/applicationContext.xml]
2. xml 파일 입력
2014. 7. 25 오전 10:16:48 org.springframework.context.support.AbstractApplicationContext prepareRefresh
정보: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@341960: startup date [Fri Jul 25 10:16:48 KST 2014]; root of context hierarchy
2014. 7. 25 오전 10:16:48 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
정보: Loading XML bean definitions from class path resource [coupling/applicationContext.xml]
2014. 7. 25 오전 10:16:48 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
정보: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@641e9a: defining beans [tv]; root of factory hierarchy
3. LGTV 생성자
LG TV 끄기
LG TV 켜기
Volume 내리기
Volume 올리기