Today, the problem encountered in the project development process; java.lang.IllegalArgumentException: Wildcard string can not be null or empty.
Cause of the error, in doing certification, there is null
Subject subject = SecurityUtils.getSubject(); ActiveUser activeUser = (ActiveUser) subject.getPrincipal(); 原因一: activeUser.getPermissions() == null 原因二: List<SysPermission> permissions = activeUser.getPermissions(); permissions 里值存在null 运行 if( !subject.isPermitted(permissions) )会报错
Solution
// Causes a solution: // custom realm in value added permissionList activeUser.setPermissions (permissionList); // solution for two reasons: // null value in the Permissions remove, or change it in code database content scheduling