일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- data
- JSP
- Column Chart
- Flex 2.0
- 신혼여행
- objective-c
- Jakarta Project
- ActionScript 3.0
- download
- Renderer
- Java
- Spring Framework
- java web start
- xml
- Java Tips
- Upload Component
- Spring
- FLEX2.0
- flex
- 자바스크립트
- Flex 2.0 Lecture
- Session
- examples
- events
- LOG4J
- 정규식
- 3d
- 소스
- Linux
- Melbourne
- Today
- Total
목록Spring Framework (5)
宇而靜...
보호되어 있는 글입니다.
FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext( new String[]{ "C:/...../context1.xml", "C:/...../context2.xml", ..... } ); 라고 코딩한 뒤 appContext.getBean(String beanName) 으로 Bean을 가져와서 알맞은 클래스로 캐스팅하면 된다. classpath가 알맞게 지정되어 있다면 classpath로도 가져올 수 있다.(ClassPathXmlApplicationContext) context내의 파일들이 classpath위주로 셋팅이 되어 있으므로 될 수 있으면 classpath를 권장한다.
웹 어플리케이션에서 각 페이지마다 세션체크를 하게 되는데 이럴 때 Spring Framework의 Interceptor를 이용하면 한번의 코딩으로 모든 페이지를 체크할 수 있게 된다. import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndViewDefiningException; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; publi..
보호되어 있는 글입니다.
보호되어 있는 글입니다.