2016-03-05 59 views
0

我有一個控制器用作REST API,並且一些操作返回I18N並具有參數的錯誤消息。我面臨的問題是爭論沒有得到解決,不知道爲什麼。Grails 2.5.3未解析控制器上的消息參數

這是我在做什麼的例子:

message(code:'query.execute.error.organizationDoesntExists', args:[organizationUid]) 

在輸出,只是query.execute.error.organizationDoesntExists。代碼在I18N屬性文件中定義。

而且,似乎Grails的錯誤不解決的爭論,例如保存,因爲沒有數據提供了對幾個字段錯誤域實例:

Property [{0}] of class [{1}] cannot be null 
Property [{0}] of class [{1}] cannot be null 
Property [{0}] of class [{1}] cannot be null 
Property [{0}] of class [{1}] cannot be null 

任何想法?

+0

你能提供一些更多的代碼,比如你什麼時候使用上面的代碼和你的'message.properties'文件 –

回答

1

可能query.execute.error.organizationDoesntExists不在編譯messages.properties。清理並重建您的項目。