这是我的拦截器
岩缓郑bean>
其中allowUrls就是不拦截的
在拦截器中
private List
public List
return allowUrls;
}
public void setAllowUrls(List
this.allowUrls = allowUrls;
}
public boolean preHandle(HttpServletRequest request,
HttpServletResponse response, Object handler) throws Exception {
String requestUri = request.getRequestURI();
for (String url : allowUrls) {
if (requestUri.endsWith(url)) {
return true;
}
}