Failed to load class "org.slf4j.impl.StaticLoggerBinder"
2024-10-16 10:37:20
调试程序出现如下错误:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
下载相应的slf4j的jar包,在slf4j官网下载,
以1.7.21版本为例。
一般只是在程序中引入了slf4j-api-1.7.21.jar文件。
解决方式如下:
解压下载的zip包中,拷贝 slf4j-nop-1.7.21.jar 文件到项目中,再build path, 就解决了。
---
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<!-- 只有接口,没有实现,需要依赖log4j-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-nop -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.22</version>
</dependency>
最新文章
- angularjs向后台传参,后台收不到数据
- Qt串口通信接收数据不完整的解决方法
- Bootstrap2和3的区别
- 笔记《Java程序性能优化 让你的Java程序更快、更稳定》 第二章 设计调优
- STL中用erase()方法遍历删除元素 .xml
- C#设计模式学习资料--外观模式
- loadmore &; scroll
- Chapter 3. Installing Gradle 安装gradle
- Linux系统监控
- Spring自定义标签
- 编程语言基础:用“收集器”理解各种语言(C++、Java、Python)中的可变参数!
- hihocoder 1015题
- 0502-其他html标签
- UVA11825 黑客的攻击 Hackers&#39; Crackdown 状压DP,二进制,子集枚举
- unity打包exe中的资源管理
- check
- JS怎么控制input框的背景颜色
- P2761 软件补丁问题
- Microsoft - Union Two Sorted List with Distinct Value
- scss在ide的命令参数
热门文章
- 【BZOJ2006】【NOI2010】超级钢琴(主席树,优先队列)
- Codeforces 633C Spy Syndrome 2 | Trie树裸题
- 浅谈Tarjan算法及思想
- 在Struts2的Action中获得request response session几种方法
- WHY C++ ?(by Herb Sutter) &; C++17 standard
- [case]filesystem problem
- IAR ------- 在线调试技巧
- GO_02:GO语言开篇
- 并发库应用之二 &; Java原子性操作类应用
- Java7的新特性