关于springboot:Could-not-initialize-class-netsfcglibbeansBeanMapGenerator

5次阅读

共计 471 个字符,预计需要花费 2 分钟才能阅读完成。

#### 问题背景
我的项目应用 springboot 整合 easyexcel
文件导出时报错 Could not initialize class net.sf.cglib.beans.BeanMap$Generator

  • easyexcel 版本为 3.0.5
  • springboot 版本为 2.3.12
    #### 解决方案
    调整 pom 依赖为以下

      <dependency>
          <groupId>com.alibaba</groupId>
          <artifactId>easyexcel</artifactId>
          <version>3.0.5</version>
          <exclusions>
              <exclusion>
                  <groupId>cglib</groupId>
                  <artifactId>cglib</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>cglib</groupId>
          <artifactId>cglib</artifactId>
          <version>3.1</version>
      </dependency>
    
正文完
 0