3
我想在Grails應用程序中添加自定義的SpEL方法,就像它爲this question中的普通Spring-Security應用程序所做的一樣,方法是覆蓋EvaluationContext。這會工作嗎?在Grails中用自己的方法擴展SpEL?
如何將global-method-security
插入安全配置?我可以configure security,但要添加什麼?類似於
grails.plugins.springsecurity = {
'global-method-security' {
'expression-handler' {
ref("myMethodSecurityExpressionHandler")
}
}
}
?但是什麼代碼會解釋它?
調查SpringSecurityCoreGrailsPlugin.groovy
也給我沒有見解。
非常感謝你。 ACL插件做到了,但是我的'expressionHandler' neveer被調用。應用程序的'resources.groovy'是在插件的'configureExpressionBeans()/ doWithSpring()'之前執行的,因此我的'expressionHandler'可能被ACL所覆蓋。尋找解決方法。 –
沒有設法讓它拾取我的'expressionHandler' - 顯然ACL被實例化了。我能做什麼? –
@VictorSergienko:任何成功?我處於同樣的情況。 –