我意识到我的一个项目使用slf4j 1.5.8,而Hibernate使用slf4j 1.6。在使用Maven构建时,它下载了这两个jars,但我猜使用的是1.5.8的类文件。因此,当我运行程序时,我得到以下错误:
SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6]
在pom.xml
中,我已经将
<dependencyManagement>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
</dependencyManagement>
1.5.8是依赖的一部分,所以它可以自己下载。
https://stackoverflow.com/questions/5477942
复制相似问题