无法使用 hbase-shaded-client jar,因为它内部依赖于 log4j-1.2.17(CVE-2019-1757)
Can't use hbase-shaded-client jar because of its internal dependency to log4j-1.2.17(CVE-2019-1757)
有没有办法排除 it.I 尝试了一下但是遇到了 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>
有没有办法排除 it.I 尝试了一下但是遇到了 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>