博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Multiple bindings were found on the class path(转)
阅读量:6228 次
发布时间:2019-06-21

本文共 1797 字,大约阅读时间需要 5 分钟。

Multiple bindings were found on the class path

SLF4J API is designed to bind with one and only one underlying logging framework at a time. If more than one binding is present on the class path, SLF4J will emit a warning, listing the location of those bindings.

When multiple bindings are available on the class path, select one and only one binding you wish to use, and remove the other bindings. For example, if you have both slf4j-simple-1.7.9.jar and slf4j-nop-1.7.9.jar on the class path and you wish to use the nop (no-operation) binding, then remove slf4j-simple-1.7.9.jar from the class path.

The list of locations that SLF4J provides in this warning usually provides sufficient information to identify the dependency transitively pulling in an unwanted SLF4J binding into your project. In your project's pom.xml file, exclude this SLF4J binding when declaring the unscrupulous dependency. For example, cassandra-all version 0.8.1 declares both log4j and slf4j-log4j12 as compile-time dependencies. Thus, when you include cassandra-all as a dependency in your project, the cassandra-all declaration will cause both slf4j-log4j12.jar and log4j.jar to be pulled in as dependencies. In case you do not wish to use log4j as the the SLF4J backend, you can instruct Maven to exclude these two artifacts as shown next:

org.apache.cassandra
cassandra-all
0.8.1
org.slf4j
slf4j-log4j12
log4j
log4j
http://www.slf4j.org/codes.html#multiple_bindings

转载于:https://www.cnblogs.com/softidea/p/4181540.html

你可能感兴趣的文章
Redis的管理
查看>>
数字电路建模 - jchdl
查看>>
Tomcat6.x+jndi配置
查看>>
SDWebImage
查看>>
全同态加密算法
查看>>
搭建hexo博客
查看>>
shell编程(一)基础
查看>>
图的着色问题
查看>>
( 转)UVM验证方法学之一验证平台
查看>>
Jdbc&Web
查看>>
MySQL 数据类型
查看>>
对于WEB APP安全问题的一些思考
查看>>
《Unicast QoS Routing Algorithms for SDN Survey 2018》【毕设 - 论文阅读】
查看>>
修改上传文件控件的样式-----html,css
查看>>
Firebug控制台详解[转]
查看>>
使用Flash Builder 4.6出现 新建配置 失败 java.lang.NullPointerException错误
查看>>
Frp基础配置模版
查看>>
JDK源码阅读--Object
查看>>
有关于认证和加密
查看>>
深入浅出Git教程(转载)
查看>>