我在这里做错了什么,我无法将JSON 对象从Grails Controller传递给Grails 服务。
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().
堆栈跟踪如下: