ここで私が間違っているのは、JSON オブジェクトをGrails ControllerからGrails Serviceに渡すことができないことです。
class SampleController {
def sampleService
def updateProduct() {
def jq = request.JSON
sampleService(jq)
}
}
class SampleService {
def updateProduct (JSONObject requestJSON) {
if (!requestJSON) {
return null;
}
}
}
メソッドのシグネチャはありません:com.SampleService.call()は引数の型に適用されます:(org.codehaus.groovy.grails.web.json.JSONObject)値:
可能な解決策:
wait(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure), find().
スタックトレースは次のとおりです。