gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 15:42:41 26 4
gpt4 key购买 nike

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

我以以下格式传递数据:

 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您不小心使用的类。重命名您的本地类(首选)或将注入(inject)强类型为插件提供的注入(inject)。

关于Grails 导出插件引发错误 "No Signature Of Method is allowed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55285446/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com