SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

网友投稿 823 2022-10-01

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

当我运行一个sparkjava demo的时候,出现了下面的问题:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See for further details

程序见官网:dependency为:

com.sparkjava spark-core 2.7.1

我运行的代码为:

import static spark.Spark.*;public class HelloWorld { public static void main(String[] args) { get("/hello", (req, res) -> "Hello World"); }}

右键 run as,结果就莫名其妙的报错了。然后加入了以下的依赖,运行成功了,感谢帮助我的实验室同学:

org.slf4j slf4j-simple 1.7.13 compile org.slf4j slf4j-log4j12 1.7.13 compile org.slf4j slf4j-nop 1.7.13 compile

参考文献

[1].SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error.https://stackoverflow.com/questions/11916706/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder-error

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:关于RedisTemplate之opsForValue的使用说明
下一篇:微信公众平台与小程序的区别是什么?(微信公众平台和小程序一样吗)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~