我使用Apache Shiro作爲我的應用程序的審查框架。我在下面http://www.grails.org/plugin/shiro 參考和我的應用程序拋出異常:Grails應用程序中的shiro配置錯誤
沒有安全管理器訪問到調用代碼,無論是綁定到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) at junit.framework.Test $ run.call(Unknown Source)
我能做些什麼?
你只運行測試時所遇到的問題?我也使用shiro,我也有這個問題 - 但只有在測試時。你有沒有制定出解決方案? – Brandon 2010-03-26 10:46:45