Spring 常用类

一、拦截器

  

Spring 常用类
public class SysInteceptor implements HandlerInterceptor {

    /**
     * 最后执行,可用于释放资源
     */
    @Override
    public void afterCompletion(HttpServletRequest arg0,
            HttpServletResponse arg1, Object arg2, Exception arg3)
            throws Exception {
        // TODO Auto-generated method stub

    }
    
    /**
     * 生成视图之前执行
     */
    @Override
    public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
            Object arg2, ModelAndView arg3) throws Exception {
        // TODO Auto-generated method stub

    }
    
    /**
     * Action之前执行
     */
    @Override
    public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1,
            Object arg2) throws Exception {
        // TODO Auto-generated method stub
        return true;
    }

}
View Code

Spring 常用类

上一篇:Project Honey Pot


下一篇:GDI+笔记