Skip to content

SLF4J Warning: Class path contains multiple SLF4J bindings. #5

@tianxiao-ma

Description

@tianxiao-ma

使用autoconfig的_maven_插件时,报_SLF4J multiple bindings_警告。

插件版本:

<groupId>com.alibaba.citrus.tool</groupId>
<artifactId>autoconfig-maven-plugin</artifactId>
<version>1.2</version>

警告信息如下:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/tianxiao/Dev/m2_repo/com/alibaba/citrus/tool/antx-autoconfig/1.2/antx-autoconfig-1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/tianxiao/Dev/m2_repo/com/alibaba/citrus/tool/antx-autoexpand/1.2/antx-autoexpand-1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

从警告信息中可以看出,是antx-autoconfig-1.2.jarantx-autoexpand-1.2.jar这两个jar同时包含了StaticLoggerBinder这个类导致的。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions