본문 바로가기
프로그래밍/spring

spring ApplicationContext bean 초기화

by 카라미 2015. 10. 26.


commons-logging-1.1.jar


org.springframework.asm-3.0.5.RELEASE.jar


org.springframework.beans-3.0.5.RELEASE.jar


org.springframework.context-3.0.5.RELEASE.jar


org.springframework.core-3.0.5.RELEASE.jar


org.springframework.expression-3.0.5.RELEASE.jar





TVUser.java

public class TVUser {

public static void main(String[] args) {


ApplicationContext factory = new                              ClassPathXmlApplicationContext("applicationContext.xml"); 

SamsungTV tv = (SamsungTV)factory.getBean("samsung");

}


}


'프로그래밍 > spring' 카테고리의 다른 글

springMVC config  (0) 2015.10.28
springMVC config  (0) 2015.10.28
sping ioc annotaion 기반 설정 예제  (0) 2015.10.27
spring BeanFactory bean 초기화 예제  (0) 2015.10.26
spring ajax  (0) 2015.07.29