说明:在做excel导出,进行接口工具测试的时候,发现后台抛异常java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook
检查了一下我的poi相关依赖的版本,用的是3.7,换成3.17然后build项目,在验证接口就可以了。
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.17</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.17</version> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>4.1.3</version> </dependency>