【发布时间】:2011-01-17 02:23:19
【问题描述】:
我正在使用 Apache Shiro 作为我的应用程序的 athetication 框架。我正在关注http://www.grails.org/plugin/shiro 的参考资料 我的应用程序抛出异常:
调用代码无法访问 SecurityManager,绑定到 org.apache.shiro.util.ThreadContext 或作为 vm 静态单例。这是一个无效的应用程序配置。
java.lang.IllegalStateException:调用代码无法访问 SecurityManager,绑定到 org.apache.shiro.util.ThreadContext 或作为 vm 静态单例。这是无效的应用程序配置。 在 org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:115) 在 org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:57) 在 br.netsoft.ShiroDbRealmTests.testAutenticarComDadosCorretos(ShiroDbRealmTests.groovy:58) 在 junit.framework.Test$run.call(Unknown Source)
我能做什么?
【问题讨论】:
-
您只是在运行测试时遇到问题吗?我也在使用 shiro,我也有这个问题 - 但仅限于测试时。你找到解决办法了吗?
标签: grails grails-plugin shiro