拦截器属于Spring,与过滤器有所不同,过滤器属于Servlet的api
直接上代码
public class MyInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
System.