1、自定义拦截器 实现HandlerInterceptor接口、重写拦截器方法
2、配置拦截器,通过@Configuration自定义配置类 ,实现WebMvcConfigurer接口 , 重写添加拦截器的方法addInterceptors()
3、WebMvcConfigurer的方法
1、自定义拦截器 实现HandlerInterceptor接口、重写拦截器方法
2、配置拦截器,通过@Configuration自定义配置类 ,实现WebMvcConfigurer接口 , 重写添加拦截器的方法addInterceptors()
3、WebMvcConfigurer的方法