【问题标题】:grails 2.3.5 + redis-gorm plugin + spring security core plugingrails 2.3.5 + redis-gorm 插件 + spring 安全核心插件
【发布时间】:2015-04-09 03:31:58
【问题描述】:

我在使用 Redis 作为数据存储和 Spring Security 插件运行 Grails 2.3.5 应用程序时遇到问题?
我在提交登录表单时收到了这个“有趣”的消息(全新的 grails 项目,安装了 spring-security-core 和 redis-gorm 插件,并且使用 s2-quickstart 命令生成了 User、Role、Requestmap 类):

Error 500: Internal Server Error 
URI 
/test-redis-security/j_spring_security_check 
Class 
java.lang.IllegalArgumentException 
Message 
No transactionManager bean configured 
Trace 
 Line | Method
->>  706 | withTransaction in org.grails.datastore.gorm.GormStaticApi
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1145 | runWorker       in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run             in java.lang.Thread


    Any ideas?

【问题讨论】:

    标签: spring grails redis


    【解决方案1】:

    Spring Security Core 默认设置为需要事务,而 redis-gorm 插件不支持它们。您将需要覆盖 spring 安全代码提供的大多数服务以不需要事务。

    【讨论】:

    • 感谢 Jeff 的回复,您能否逐步解释一下如何执行此覆盖过程?
    • 从已安装的类开始,确保它们中没有事务调用。之后,您将需要查看 spring secuirty 核心的源代码并查看哪些方法需要事务并开始用您自己的方法覆盖它们。寻找 Burt Beckwiths 黑客春季安全会谈
    猜你喜欢
    • 2015-12-09
    • 2018-11-02
    • 2016-04-16
    • 2016-06-12
    • 2012-05-24
    • 2016-05-24
    • 2014-09-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多