Spring拦截器配置
编写拦截器
public class MyInterceptor implements HandlerInterceptor {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
System.out.println("请求到达controller之前");
return true;
}
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
System.out.println("请求离开controller之后");
}
public vo
Spring拦截器配置最先出现在Python成神之路。
共有 0 条评论