shiro权限异常Wildcard string cannot be null or empty

java.lang.IllegalArgumentException: Wildcard string cannot be null or empty. Make sure permission strings are properly formatted.at org.apache.shiro.authz.permission.WildcardPermission.setParts(WildcardPermission.java:155)
    at org.apache.shiro.authz.permission.WildcardPermission.(WildcardPermission.java:144)
    at org.apache.shiro.authz.permission.WildcardPermission.(WildcardPermission.java:140)
    at org.apache.shiro.authz.permission.WildcardPermissionResolver.resolvePermission(WildcardPermissionResolver.java:41)
    at org.apache.shiro.realm.AuthorizingRealm.resolvePermissions(AuthorizingRealm.java:434)
    at org.apache.shiro.realm.AuthorizingRealm.getPermissions(AuthorizingRealm.java:410)
    at org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:468)
    at org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:463)

 

通配符不能为null或空 是什么??  

解决思路,

debug发现,没有获取到相应的权限,获取的用户权限为空数组。

去把sql拷下来,查询  发现有数据。。但是有一条数据为null;

继续分析sql,发现是分配了两个角色。但有一个角色没有分配任何权限导致查出来为null,把用户角色改为只有一个且有权限这个。。。再次测试。通过。!!

你可能感兴趣的:(java)