Grails 导出插件抛出错误 "No Signature Of Method is allowed"

Grails export plugin Throws an Error "No Signature Of Method is allowed"

您好,我正在使用 grails 导出插件并在 excel 的依赖项和 mime 类型中添加了插件。

我正在按以下格式传递数据:

 FileOutputStream output = new FileOutputStream("C:/dummy/test1.xlsx")
 def empDate = [[joindate:2018-01-30,desig:Instructor]]
 List fields = ["joindate", "desig"]
 Map labels = ["joindate": "Join Date", "desig": "Designation"]

 exportService.export("xlsx", output,empDate, fields, labels, [:], [:])

 //Throws an error "No Signature of method is allowed for argument types ....."

完整错误是

No signature of method: com.test.ExportService.export() is appl icable for argument types: (java.lang.String, java.io.FileOutputStream, java.util.ArrayLis t, java.util.ArrayList, java.util.LinkedHashMap, java.util.LinkedHashMap, java.util.Linked HashMap) values: [xlsx, java.io.FileOutputStream@10234, [[joindate:2018-01-30, ...]], . ..] Possible solutions: every()

com.test.ExportService.export() 表示您正在使用插件提供的导出服务实现以外的实现。您可能不小心使用了本地定义的 ExportService class。重命名您的本地 class(首选)或强类型注入到插件提供的注入。