swagger突然不好使,原来是被拦截器拦截
swagger突然不好使,原来是被拦截器拦截
解决:在WebMvcConfig文件中进行配置
/**
* 使用拦截器需要在这配置
* 拦截 初始化的菜单(依据用户权限显示)
*
* @param registry todo
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
String[] excludePathArr = {"/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**"};
registry.addInterceptor(authorizationInterceptor).addPathPatterns("/*/**").excludePathPatterns(excludePathArr);
}