일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- JDOM
- tomcat
- swingx
- 가우스
- JSON
- MFC
- Spring
- 선택적조인
- MySQL
- Eclipse
- WebLogic
- rowspan
- iBATIS
- phonegap
- jsr 296
- Android
- Ajax
- oracle
- PLSQL
- node.js
- GPS
- appspresso
- jQuery
- PHP
- Google Map
- 전자정부프레임워크
- sencha touch
- Struts
- dock
- ibsheet
Archives
- Today
- Total
Where The Streets Have No Name
spring 3.x에서 interceptor처리 본문
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- Configures the @Controller programming model -->
<mvc:annotation-driven />
<!-- Configures Handler Interceptors -->
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/test/*.do"/>
<bean class="egovframework.rte.test.web.RequestInitializeInterceptor" />
</mvc:interceptor>
</mvc:interceptors>
</beans>
package egovframework.rte.test.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
public class RequestInitializeInterceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
System.out.println("@@@@@@ - interceptor");
return true;
}
}