package com.lxzn.config; import com.lxzn.interceptor.LicenseInterceptor; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * @Description: * @Author: zhangherong * @Date: Created in 2021/6/17 17:19 * @Version: 1.0 * @Modified By: */ @Configuration @Slf4j public class LicenseInterceptorConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new LicenseInterceptor()) //拦截的路径 .addPathPatterns("/**") .excludePathPatterns("/auth/user/logout", "/websocket/**","outer/**", "services/**"); } }