SLF4J: Class path contains multiple SLF4J bindings
来源:互联网 发布:c 二维数组输入 编辑:程序博客网 时间:2024/06/05 16:47
问题描述
启动 web 应用时,每次都报下面的警告信息:
SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/D:/apache-maven-3.3.9/Repositories/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/D:/apache-maven-3.3.9/Repositories/repository/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]log4j:WARN No appenders could be found for logger (cn.gs.proj.vms.support.DefaultVmClientSessionListener).log4j:WARN Please initialize the log4j system properly.
从打印的信息看是类路径下包含多个 SLF4J 绑定,是 slf4j-log4j12-1.7.5.jar 和
logback-classic-1.0.13.jar,而 logback-classic-1.0.13.jar 里面有包含 slf4j-api,导致类路径下包含多个 SLF4J 绑定。
解决方法
只要去掉 slf4j-log4j12 依赖就可以了:
<!-- <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version></dependency> -->
阅读全文
0 0
- SLF4J: Class path contains multiple SLF4J bindings
- SLF4J: Class path contains multiple SLF4J bindings
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings.
- SLF4J: Class path contains multiple SLF4J bindings
- SLF4J: Class path contains multiple SLF4J bindings
- Class path contains multiple SLF4J bindings
- Tensorflow- Class path contains multiple SLF4J bindings
- SLF4J: Class path contains multiple SLF4J bindings 错误
- Hbase SLF4J: Class path contains multiple SLF4J bindings 错误
- SLF4J: Class path contains multiple SLF4J bindings 错误
- 第14期《成长之路》2017年11月刊
- PAT (Basic Level) Practise (中文)1023. 组个最小数 (20)
- Netty源码分析:read
- 与高德地图的一些恩怨(一)定位
- 04:运算符
- SLF4J: Class path contains multiple SLF4J bindings
- SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)
- Ubuntu Server 16.04.3上Moodle 3.3搭建(含PHP7.1编译)
- 开心的金明
- Unity-Android篇-使用 ShareSDK 分享
- LinuxC信号及信号处理(1)
- 第一次博客
- 使用Qt Creator作为Linux IDE,实现CMake编译和单步调试
- NOIP2015跳石头