【发布时间】:2011-08-15 14:15:25
【问题描述】:
我在Config.groovy中添加了以下参数
storeFront.cms.endpoint = "http://10.60.33.51:27110/file_source"
我正在尝试使用:
ConfigurationHolder.config('storeFront.cms.endpoint')
我在某处读到配置参数应该使用标记库和控制器中可用的grailsApplication 变量来读取,但在我的情况下,我试图从src/groovy 下的类中读取它。
应用程序启动时出现错误:
groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.call()
is applicable for argument types: (java.lang.String) values: [storeFront.cms.endpoint]
【问题讨论】: