使用EasyExcel报错 com.alibaba.excel.exception.ExcelGenerateException: java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader 报错原因:缺少依赖或者依赖冲突,导致找不到类
使用postman测试结果如下:
console 中报错如下:
解决方法出处:https://www.jianshu.com/p/643fecc462fe 提示NoClassDefFoundError 检查依赖是否存在,或者依赖冲突问题
1、若依赖不存在
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.17</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.17</version> </dependency>
2、若依赖冲突
<exclusions> <exclusion> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> </exclusion> <exclusion> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> </exclusion> <exclusion> <artifactId>poi-ooxml-schemas</artifactId> <groupId>org.apache.poi</groupId> </exclusion> </exclusions>
标签:lang,ExcelGenerateException,NoClassDefFoundError,报错,poi,apache,org,com From: https://www.cnblogs.com/charler/p/16616826.html