安装spring-security-core后grails app中的TransactionManager错误

时间:2014-06-26 13:53:02

标签: grails spring-security

我一直在努力将Spring Security Core集成到我的应用程序中并正常工作。经过一番挖掘,我找到了很多很好的指导,但已经碰壁了。我基本上是在我的帐户存在的地方,我的角色存在,我的密码编码正确,但每个帐户的登录失败。

我跟随this question中给出的调试建议,它出现了一个与那里回答的问题不同的问题,而且我在google搜索时无法找到答案。这可能是由于我对框架的新见解。

我将此添加到我的Config.groovy中,正如Burt建议的那样:

grails.plugin.springsecurity.onAbstractAuthenticationFailureEvent = { e, appCtx ->
   println "\nERROR auth failed for user $e.authentication.name: $e.exception.message\n"
}

再次尝试登录我的应用程序。我再次收到“抱歉,我们无法找到具有该用户名和密码的用户”错误。当我查看控制台时,按照上述问题的指示,通过log4j启用了额外的日志记录,我发现了这一点:

ERROR auth failed for user bretw: No transactionManager bean configured

完整的跟踪在这里:http://pastebin.com/C2SkLgXZ

我当然没有自己配置任何交易管理;这是Spring Security Core所需要的东西,如果有的话,是否有关于如何设置它的文档,我只是没有看到?我使用MongoDB作为我的数据库,所以我没有使用Hibernate。

我使用spring-security-core 2.0-RC2运行Grails 2.3.4和mongodb 1.3.0。

1With specified username getting 'Sorry, we were not able to find a user with that username and password.' message when logging int“”

0 个答案:

没有答案
相关问题