springboot创建拦截器

一、创建一个MyIntercepor实现HandlerInterceptor接口的类

   

   

   

二、创建一个WebMvcConfig实现WebMvcConfigurer的类

   

   

   

三、创建Controller以供访问

   

   

四、效果图

   

   

原文地址:https://www.cnblogs.com/fernfei/p/12079608.html