Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- download
- Session
- 자바스크립트
- Flex 2.0
- Renderer
- 정규식
- Melbourne
- Column Chart
- objective-c
- Java Tips
- flex
- 소스
- 신혼여행
- examples
- JSP
- data
- java web start
- FLEX2.0
- Upload Component
- Java
- Flex 2.0 Lecture
- ActionScript 3.0
- 3d
- Spring Framework
- Spring
- Linux
- LOG4J
- Jakarta Project
- events
- xml
Archives
- Today
- Total
宇而靜...
[Java Tips] JDK 1.4 이하에서 Spring BeanFactory Test하기 본문
FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(
new String[]{
"C:/...../context1.xml",
"C:/...../context2.xml", .....
}
);
new String[]{
"C:/...../context1.xml",
"C:/...../context2.xml", .....
}
);
라고 코딩한 뒤 appContext.getBean(String beanName) 으로 Bean을 가져와서 알맞은 클래스로 캐스팅하면 된다.
classpath가 알맞게 지정되어 있다면 classpath로도 가져올 수 있다.(ClassPathXmlApplicationContext)
context내의 파일들이 classpath위주로 셋팅이 되어 있으므로 될 수 있으면 classpath를 권장한다.