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 | 31 |
Tags
- 소스
- 정규식
- 신혼여행
- Upload Component
- data
- Flex 2.0
- Linux
- ActionScript 3.0
- Spring
- Renderer
- Spring Framework
- 자바스크립트
- FLEX2.0
- Flex 2.0 Lecture
- events
- java web start
- Session
- examples
- Jakarta Project
- Column Chart
- Java
- xml
- Melbourne
- 3d
- LOG4J
- JSP
- download
- Java Tips
- objective-c
- flex
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를 권장한다.