解决执行maven项目出现 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

最近再弄maven项目,运行起来没有问题,可是Console控制台会报错,好比说以下的问题异常提示:api

        由此咱们能够看出,报出错误的地方主要是slf4j的jar包,而故障码中“Failed to load class ’org.slf4j.impl.StaticLoggerBinder‘”的意思则是“加载类文件org.slf4j.impl.StaticLoggerBinder时失败”。maven

而官网上刊登的解决办法是:spa

复制代码
   <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.5.6</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>slf4j-simple</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.5.2</version>
        </dependency>
复制代码

加入jar包后问题完美解决!!code

相关文章
相关标签/搜索