Commit 82a5e843 by hulei

增加拦截器

parent 2c760646
......@@ -17,17 +17,13 @@ import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
public class ISCRequestPreFilter implements HandlerInterceptor {
public class ISCAuthInterceptor implements HandlerInterceptor{
Logger logger = LoggerFactory.getLogger(ISCRequestPreFilter.class);
Logger logger = LoggerFactory.getLogger(ISCAuthInterceptor.class);
@Resource
......@@ -57,8 +53,6 @@ public class ISCRequestPreFilter implements HandlerInterceptor {
BchServiceImpl.removeBchInrCacheMap();
}
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException {
clearCache();
String requestURI = request.getRequestURI();
......@@ -95,12 +89,10 @@ public class ISCRequestPreFilter implements HandlerInterceptor {
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) {
System.out.println("postHandle: " + request.getRequestURI());
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
System.out.println("afterCompletion: " + request.getRequestURI());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment