SLF4J: Class path contains multiple SLF4J bindings.

来源:互联网 发布:sql 时间转换成秒 编辑:程序博客网 时间:2024/05/16 10:23

SLF4J: Class path contains multiple SLF4J bindings.


今天在开发时遇到此错误,经过排查发现原来是 引用junit和spring test版本不匹配引起的


解决方案:查看spring test 的pom文件,发现引用

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

为4.11版本



修改主文件pom的junit为即可解决错误

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

0 0
原创粉丝点击