springbootInterceptor拦截器excludePathPatterns忽略失效excludePathPatterns方法是排除访问路径,但是当你排除的url路径在项目中并不存在的时候,springboot会将路径编程/error,从而无法进行排除.例如下面代码:registry.addInterceptor(newMyInterceptor()).addPathPatterns("/**").excludePathPatterns("/login");如果/login这个访问路径,在项目中不存在,那么当你访问http://xxxx/login的时候,依然会被拦截,因为此时变...
继续阅读 >