如何为grails spring安全ACL插件指定自己的LookupStrategy实现?
我想在我的Grails2.0.4应用程序中使用SpringSecurityACL插件。但是,我的应用程序不使用JDBC或SQL数据库。(我们正在使用MongoDB) 该插件中的GormAclLookupStrategy实现使用HQL,MongoDB Gorm不支持HQL,因此我想我需要创建该类的替代实现 我的问题是,一旦我有了替代实现,我如何配置bean来使用它?从我对插件代码的检查来看,在我看来,该插件将覆盖我配置它的尝试,并查看通常的conf机制。还是我看错了如何为grails spring安全ACL插件指定自己的LookupStrategy实现?,grails,spring-security,nosql,acl,grails-plugin,Grails,Spring Security,Nosql,Acl,Grails Plugin,我想在我的Grails2.0.4应用程序中使用SpringSecurityACL插件。但是,我的应用程序不使用JDBC或SQL数据库。(我们正在使用MongoDB) 该插件中的GormAclLookupStrategy实现使用HQL,MongoDB Gorm不支持HQL,因此我想我需要创建该类的替代实现 我的问题是,一旦我有了替代实现,我如何配置bean来使用它?从我对插件代码的检查来看,在我看来,该插件将覆盖我配置它的尝试,并查看通常的conf机制。还是我看错了 有人能给我一个线索吗@Burt
有人能给我一个线索吗@BurtBeckwith你在那里吗?如果你在
grails app/conf/spring/resources.groovy中注册了一个bean,并且与grails或插件注册的bean同名,那么你的bean优先。这对任何豆子都是正确的,不仅仅是这个。所以你可以这样做:
import com.mycompany.myapp.MyAclLookupStrategy
beans = {
aclLookupStrategy(MyAclLookupStrategy) {
// properties, bean refs, etc.
}
}