Spring Boot配置拦截器 1.创建一个注解类 2.创建一个拦截器类实现HandlerInterceptor接口 3.根据需求重写HandlerInterceptor接口中三个方法preHandle()、postHandle()、afterCompletion() 4.创建拦截器配置类实现WebMvcConfigurer接口