springboot拦截器中excludePathPattern第二个忽略名单不生效

 registry.addInterceptor(sessionInterceptor).addPathPatterns("/file/**").excludePathPatterns("/file/show/*","file/download/*")

比如上面这串代码的话download就会被拦截,调换后就是则show会被拦截,很奇怪,想问这个问题怎么解决,或者如何实现多个忽略名单

检查下配置的路径是否正确

试试 excludePathPatterns("/file/show/**","file/download/**")

你的第二个路径的file前面少了个"/"