在Grails 2.3.7中导出插件

我们最近在用Grails 2.3.7的excel-export插件时遇到了一个问题。 我们已经尝试了0.1.4和0.1.6,并且可以通过几行重新创build问题。

import pl.touk.excel.export.WebXlsxExporter def headers = ['Name', 'Description'] def withProperties = ['name', 'description'] List<Integer> products = new ArrayList<Integer>() new WebXlsxExporter().with { fillHeader(headers) add(products, withProperties) save() } 

这抛出:

没有方法的签名:fillHeader()适用于参数types:(java.util.ArrayList)values:[[Name,Description]]

这在Grails 2.0.3中用excel-export 0.1.4工作正常

有任何想法吗?

解决方法是将插件升级到版本0.1.9,这似乎解决了问题。 但是,也必须明确地排除我们的maven pom,这是以前不需要的。

我们的pom现在看起来像:

  <dependency> <groupId>org.grails.plugins</groupId> <artifactId>excel-export</artifactId> <version>0.1.9</version> <scope>runtime</scope> <type>zip</type> <exclusions> <exclusion> <groupId>xerces</groupId> <artifactId>xerces</artifactId> </exclusion> <exclusion> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> </exclusion> </exclusions> </dependency>