zoukankan      html  css  js  c++  java
  • springboot项目jar冲突问题解决

    问题:大概意思就是项目中有两个jar,同时是要是想slf4j的接口的,这样程序不知道使用哪个,就会报错了。也不算错,项目照样运行。但是就是报日志错误
    SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding
    in [jar:file:/Users/renjianjun/software/mavenLocalRespository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/renjianjun/software/mavenLocalRespository/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

     解决方式:

    我们需要先找到哪里使用了这些jar,我们去 .pom文件中让项目显示jar依赖关系图

    然后找到了依赖,那么我们就选择我们想要保留的 和 要删除的进行操作

    我这里不需要logback  所以,我在logback

    然后在pom文件中就会把这个jar抛出掉

    然后就好了,大功告成。

  • 相关阅读:
    网络编程
    C 语言 const
    C 语言 链表
    C 语言 按位计算
    C 语言 格式化输出输入
    C 语言 结构类型 联合
    C 语言 结构类型 结构
    C 语言 结构类型 枚举
    bash shell configuration
    sed usage
  • 原文地址:https://www.cnblogs.com/renjianjun/p/10906881.html
Copyright © 2011-2022 走看看