有没有办法排除它。我确实尝试了一下,但得到了ClassNotFoundException:org.apache.log4j.Level
我确实看到hbase-shaded-client确实具有slf4j依赖关系,因此可能有一种排除log4j并使用slf4j的方法,但我不能。
最佳答案
是的,您可以排除log4j
,但是必须重新添加log4j-over-slf4j
。
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>[some version]</version>
<exclusions>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>[some version]</version>
</dependency>
关于hadoop - 无法使用hbase-shaded-client jar,因为其内部依赖于log4j-1.2.17(CVE-2019-1757),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59842903/