1.Interceptor使用:
(1)、实现HandlerInterceptor接口。
(2)、继承实现了HandlerInterceptor接口的类。比如Spring已经提供的实现了HandlerInterceptor接口的抽象类HandlerInterceptorAdapter ;
2.三个重要的方法:
1)proHandle该方法将在请求处理之前进行调用,先声明的先调用,该方法的返回值是Boolean类型的,当它返回为false时,表示请求结束,后续的Interceptor和Controller都不会再执行