SLF4J: Class path contains multiple SLF4J bindings. 问题原因及解决方法。
问题
springboot项目,使用了slf4j,当引入zookeeper之后,就会报错:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/silence.hu/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/silence.hu/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.10.0/log4j-slf4j-impl-2.10.0.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]
由问题可以看出,是因为有多种SLFJ实现的绑定:logback-classic
和 slf4j-log4j12
.
因为我是引入zookeeper后才报的错,因此可以肯定是引入zookeeper后才起的jar包冲突,因此将zookeeper中的slf4j-log4j12
排除掉就好。
<!--zookeeper-->
<dependency><groupId>org.apache.zookeeper</groupId><artifactId>zookeeper</artifactId><exclusions><exclusion><groupId>org.slf4j</groupId><artifactId>slf4j-log4j12</artifactId></exclusion></exclusions>
</dependency>
SLF4J: Class path contains multiple SLF4J bindings. 问题原因及解决方法。相关推荐
- Tomcat启动log:SLF4J: Class path contains multiple SLF4J bindings.
近期启动tomcat时,看到如下输出信息: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [j ...
- SLF4J: Class path contains multiple SLF4J bindings(log4j与logback冲突了)
当你启动service或者web项目的时候,出现了如下详细地异常,那说明你配置的log4j与logback jar包发生了冲突: <span style="color:#ff0000& ...
- Hive客户端启动报SLF4J: Class path contains multiple SLF4J bindings.
使用Hive客户端的时候,如果不注意细节,那么会遇到一个问题:重复打印输出SLF4J信息 文章目录 1.出现的问题 2.根本原因 3.解决方法 4.查看最终效果 5.PS:hive日志在哪呐? 1.出 ...
- SLF4J: Class path contains multiple SLF4J bindings.
库冲突导致的异常,由于多次引入SLF4j包导致. It seems you have several implementation of SLF4J; you should exclude all t ...
- springboot 关于 Class path contains multiple SLF4J bindings.警告的解决
springboot 关于 Class path contains multiple SLF4J bindings.警告的解决 有一次配置好springboot项目启动后,忽然发现有下边的警告: SL ...
- npm install 提示 path xxx/node_modules/node-sass npm ERR command failed 解决方法
起因 前后经历了多次无法进行 npm install,每次安装依赖都出现类似于 path xxx/node_modules/node-sass npm ERR! command failed 的报错. ...
- Android Studio-Didn't find class XXX on path: DexPathList [zip file /data/xxx/base.apk]解决方法
OPPO R11 手机运行应用,打开app直接闪退,界面进都进不去.错误信息如下: --------- beginning of crash 2019-03-22 13:33:21.065 22665 ...
- 【eclipse】Multiple annotations found at this line:——解决方法
问题截图: 就是eclipse的maven插件太旧了 用新插件新建的maven项目就没有报错 用软件对比了一下这两个pom文件 只有项目名有区别 所以就是插件的问题 一个简单安装离线maven插件的方 ...
- SVN Cannot verify lock on path问题解决 SVN被锁定的几种解决方法
用SVN经常出现被锁定而无法提交的问题,选择解锁又提示没有文件被锁定,很是头疼. 这里整理了一下SVN 被锁定的几种解决方法: 1.出现这个问题后使用"清理"即"Clea ...
最新文章
- python培训班 北京-北京python培训机构那个好?这几个坑千万别踩
- Windows驱动开发学习笔记(三)—— 内核空间内核模块
- 从实例入手学习Shiro自定义Realm实现查询数据进行验证
- ViewPager用法
- python之路_计算机编码及运算符介绍
- #pragma pack(n)和sizeof求结构的大小
- codevs 1043 方格取数 2000年NOIP全国联赛提高组
- 三运放差分放大电路分析_信号源内阻对差动放大电路共模抑制比的影响分析与改善方法...
- flush无效,IIS7下php怎么实时输出?
- 信息学奥赛一本通(1158:求1+2+3+...)
- 深度学习《各种归一化的区别》
- [TorchSummary+TorchSnooper] 一次TorchSummary可视化网络的调试+TorchSnooper的第一次实际使用
- mysql repair 索引_MySQ索引操作命令总结(创建、重建、查询和删除索引命令详解)...
- Delphi 2007 XE10.1 MD5加密 中文 英文 16位 32位
- Tomcat:JAVA_HOME should point to a JDK not a JRE解决
- 兼容IE8的多文件上传实现
- 手机上将mp4转换成amv_如何在Linux上将tiff图像从RGB颜色转换为CMYK颜色?
- 企业宣传片解说词的写法指导。
- arp -s命令报错,ARP项添加失败:请求的操作需要提升。
- Android系统教程PPT,Android教程之架构详解.ppt
热门文章
- MAC查看文件所在路径
- RtAudio与QT
- 跟我一起学uniapp(2) HBuiderX下载与easy-git高效使用
- leetcode系列-136.只出现一次的数字
- 【VulnHub】JIS-CTF
- 腾讯TDW:大型Hadoop集群应用[转载]
- Unity创建C#脚本与项目的模板路径并修改
- sqlserver 创建登录名报错:‘User, group, or role ‘arms‘ already exists in the current database‘
- linux 变量函数返回值,linux shell 自定义函数(定义、返回值、变量作用域)介绍...
- 科讯首页css,科讯CMS纯CSS控制图片最大宽度