1、新建一个类并继承HandlerInterceptor接口,实现其中的afterCompletion、postHandle、preHandle方法; 2、在springmc.xml中配置拦截器; 3、运行;