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>