slf4j version conflict while building with Maven

前端 未结 3 1408
我在风中等你
我在风中等你 2020-12-08 22:11

I realised that one of my projects uses slf4j 1.5.8 and Hibernate uses slf4j 1.6. While building with Maven it downloads both jars but I guess the class files of 1.5.8 are u

3条回答
  •  情深已故
    2020-12-08 22:41

    Excluding is quite unnecessary and maybe quite misleading. Instead, explicitly include the slf4j-api with the desired version in your projects pom file. That's it!

    This approach takes advantage of Maven's transitivity rules: the nearest dependency declaration wins.

提交回复
热议问题