【发布时间】:2012-04-04 13:12:16
【问题描述】:
我尝试限制(使用deadbolt)我认为(play! framework)中的某些东西,我必须传递一个参数,例如:
#{deadbolt.restrictedResource resourceKeys:['projectEdit'], resourceParameters:['projectId':'3'}
您注意到 3 是经过硬编码的(例如,它有效)。但我需要它是动态的,比如:
#{deadbolt.restrictedResource resourceKeys:['projectEdit'], resourceParameters:['projectId':${project.alias}]}
好吧,现在代码不再有效,但它会引发异常:
Exception raised was MissingMethodException : No signature of method: Template_1012.$() is applicable for argument types: (Template_1012$_run_closure1_closure2) values: [Template_1012$_run_closure1_closure2@370c488c] Possible solutions: _(java.lang.String), is(java.lang.Object), run(), run(), any(), get(java.lang.String).
你知道为什么会这样吗?
【问题讨论】: