java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook
說明:在做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>