想使用instanceof 来判断类型的时候为什么会直接跳过的呢
if (principal instanceof CsUser) {
Long UserId = csJwtService.getAuthenticationId();
Set<String> urls = rbacUrlService.urls( UserId );
//不能使用等于来比较
for (String url : urls) {
//如果存在url就返回true
if (antPathMatcher.match(url, request.getRequestURI())) {
hasPermission = true;
break;
}
}
}