Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

引入fastexcel后log4j2日志冲突 #180

Open
OPbjO opened this issue Jan 5, 2025 · 0 comments
Open

引入fastexcel后log4j2日志冲突 #180

OPbjO opened this issue Jan 5, 2025 · 0 comments

Comments

@OPbjO
Copy link

OPbjO commented Jan 5, 2025

版本
fastexcel版本:1.0.0
spirngboot版本:2.7.18

问题描述
springboot使用了log4j2作为日志框架,但是fastexcel引入了logback-core和logback-classic,导致log4j2冲突失效。
报错信息:SLF4J: Class path contains multiple SLF4J bindings.

临时解决方案
手动排除fastexcel引入的依赖

 <dependency>
      <groupId>cn.idev.excel</groupId>
      <artifactId>fastexcel</artifactId> 
      <version>${fastexcel.version}</version>
      <exclusions>
          <exclusion>
              <groupId>ch.qos.logback</groupId>
              <artifactId>logback-core</artifactId>
          </exclusion>
          <exclusion>
              <groupId>ch.qos.logback</groupId> 
              <artifactId>logback-classic</artifactId>
          </exclusion>
      </exclusions>
</dependency>

希望后续版本能优化

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant