Java 从我的数据库检索权限始终为空

Java 从我的数据库检索权限始终为空,java,shiro,Java,Shiro,我遇到了一个问题,在这个问题上,所有东西都可以工作,比如角色和身份验证。但是,我的开发已经停止,因为我无法获得帐户的权限。权限总是返回null,我不知道为什么 DefaultSecurityManager defaultSecurityManager = new DefaultSecurityManager(); ModularRealmAuthenticator authenticator = new ModularRealmAuthenticator(); authenticator.set

我遇到了一个问题,在这个问题上,所有东西都可以工作,比如角色和身份验证。但是,我的开发已经停止,因为我无法获得帐户的权限。权限总是返回null,我不知道为什么

DefaultSecurityManager defaultSecurityManager = new DefaultSecurityManager();
ModularRealmAuthenticator authenticator = new ModularRealmAuthenticator();
authenticator.setAuthenticationStrategy(new AtLeastOneSuccessfulStrategy());
defaultSecurityManager.setAuthenticator(authenticator);
ModularRealmAuthorizer authorizer = new ModularRealmAuthorizer();
authorizer.setPermissionResolver(new WildcardPermissionResolver());
defaultSecurityManager.setAuthorizer(authorizer);
JdbcRealm realm = new JdbcRealm();
realm.setDataSource(DatabaseUtil.DATA_SOURCE);
realm.setAuthenticationQuery("SELECT password FROM account WHERE username = ?");
realm.setUserRolesQuery("SELECT accountRole FROM account WHERE username = ?");
realm.setPermissionsQuery("SELECT permissions FROM account WHERE username = ?");
realm.setPermissionsLookupEnabled(true);
realm.setCredentialsMatcher(new PasswordMatcher());
defaultSecurityManager.setRealm(realm);
SecurityUtils.setSecurityManager(defaultSecurityManager);
你试过什么?()手动运行权限查询时会发生什么情况?您尝试了什么?()手动运行权限查询时会发生什么情况?