javax.servlet.ServletException: java.lang.IllegalArgumentException: Wildcard string cannot be null or empty. Make sure permission strings are properly formatted. org.apache.shiro.web.servlet.AdviceFilter.cleanup(AdviceFilter.java:196) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:148) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
root cause
java.lang.IllegalArgumentException: Wildcard string cannot be null or empty. Make sure permission strings are properly formatted. org.apache.shiro.authz.permission.WildcardPermission.setParts(WildcardPermission.java:151) org.apache.shiro.authz.permission.WildcardPermission.<init>(WildcardPermission.java:142) org.apache.shiro.authz.permission.WildcardPermission.<init>(WildcardPermission.java:138) org.apache.shiro.authz.permission.WildcardPermissionResolver.resolvePermission(WildcardPermissionResolver.java:41) org.apache.shiro.realm.AuthorizingRealm.resolvePermissions(AuthorizingRealm.java:433) org.apache.shiro.realm.AuthorizingRealm.getPermissions(AuthorizingRealm.java:409) org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:466) org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:462) org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:457) org.apache.shiro.authz.ModularRealmAuthorizer.isPermitted(ModularRealmAuthorizer.java:223) org.apache.shiro.mgt.AuthorizingSecurityManager.isPermitted(AuthorizingSecurityManager.java:113) org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter.isAccessAllowed(PermissionsAuthorizationFilter.java:45) org.apache.shiro.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:162) org.apache.shiro.web.filter.PathMatchingFilter.isFilterChainContinued(PathMatchingFilter.java:203) org.apache.shiro.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:178) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:131) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
帅哥,问题解决了吗
这个问题是你读数据库权限时有个权限为空。是你的数据库问题。
你debug到这句话,atorg.apache.shiro.authz.permission.WildcardPermissionResolver.resolvePermission(WildcardPermissionResolver.java:41)
有个
<spanstyle="background-color:#e4e4ff;">permissionString为空。
<spanstyle="background-color:#e4e4ff;">WildcardPermissionResolver类的方法:
<spanstyle="color:#000080;font-weight:bold;">publicPermissionresolvePermission(StringpermissionString){<spanstyle="color:#000080;font-weight:bold;">returnnewWildcardPermission(permissionString);}
怎么解决的?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。