我在使用 Redis 作为数据存储和 Spring Security 插件运行 Grails 2.3.5 应用程序时遇到问题?
我在提交登录表单时收到这条“有趣”的消息(安装了 spring-security-core 和 redis-gorm 插件的全新 grails 项目以及使用 s2-quickstart 命令生成的用户、角色、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 Security Core 默认设置为需要事务,而 redis-gorm 插件不支持它们。您将需要覆盖 spring security 代码提供的大部分服务以不需要事务。
关于spring - grails 2.3.5 + redis-gorm 插件 + spring security 核心插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28409002/