IDEA中创建springboot项目遇到的问题

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.
Exception in thread "main" java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level
at org.springframework.boot.logging.logback.LogbackLoggingSystem.<clinit>(LogbackLoggingSystem.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.boot.logging.LoggingSystem.get(LoggingSystem.java:170)
at org.springframework.boot.logging.LoggingSystem.get(LoggingSystem.java:160)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:229)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:209)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:69)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:292)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at com.janko.springbootdemo.SpringbootdemoApplication.main(SpringbootdemoApplication.java:10)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.Level
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 19 more

百度“Failed to load class "org.slf4j.impl.StaticLoggerBinder"

”这个,经查是由于在自己的电脑log4j跟项目的idea项目版本不匹配。需要修改pom文件即可

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>

添加exclusions这个模块的内容就可以完成

IDEA创建springboot异常(Failed to load class "org.slf4j.impl.StaticLoggerBinder")的更多相关文章

  1. Kafka生产者案例报警告SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

    一.SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 这个报警告的原因简单来说时因为slf4j的版本 ...

  2. 解执行maven项目出现 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

    最近再弄maven项目,运行起来没有问题,但是Console控制台会报错,比如说如下的问题异常提示: 由此我们可以看出,报出错误的地方主要是slf4j的jar包,而故障码中“Failed to loa ...

  3. 解决执行maven项目出现 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

    最近再弄maven项目,运行起来没有问题,但是Console控制台会报错,比如说如下的问题异常提示: 由此我们可以看出,报出错误的地方主要是slf4j的jar包,而故障码中“Failed to loa ...

  4. Mina 中遇到SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-op ...

  5. spring quartz 定时任务“Failed to load class "org.slf4j.impl.StaticLoggerBinder”“Checking for available updated version of Quartz”

    Failed to load class "org.slf4j.impl.StaticLoggerBinder 需要slf4j-api.jar.slf4j-log4j12.jar Check ...

  6. eclipse maven SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder

    现象:运行eclipse maven build,console 有红色日志如下: SLF4J: Failed to load class "org.slf4j.impl.StaticLog ...

  7. java项目跑起来报错: 程序报 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 错误

    问题: 我用的是ssm框架结合, 利用junit测试的时候抛出 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder& ...

  8. kafka 报Failed to load class "org.slf4j.impl.StaticLoggerBinder".[z]

    转:http://blog.chinaunix.net/uid-25135004-id-4172954.html 测试kafka    producer发送消息 和  consumer 接受消息报错 ...

  9. Failed to load class "org.slf4j.impl.StaticLoggerBinder"

    调试程序出现如下错误: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Default ...

随机推荐

  1. 【ABAP系列】SAP ABAP POPUP弹出框自建内容

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP ABAP POPUP弹出框自 ...

  2. LeetCode——707 设计链表

    题目: 总而言之就是要用C++手撸链表,我的代码: class MyLinkedList { public: /** Initialize your data structure here. */ M ...

  3. 【转载】研发应该懂的binlog知识(上)

    ---------------------------------------------------------------------------------------------------- ...

  4. dp(传球)

    https://ac.nowcoder.com/acm/contest/1126/B 链接:https://ac.nowcoder.com/acm/contest/1126/B来源:牛客网 上体育课的 ...

  5. Tornado 的核是什么??

    Tornado 的核心是 ioloop 和 iostream 这两个模块,前者提供了一个高效的 I/O 事件循环,后 者则封装了 一个无阻塞的 socket .通过向 ioloop 中添加网络 I/O ...

  6. Unity3D 优化

    用UNITY开发手机游戏,背景图片和UI图片显示的比PC机上模糊非常多,怎么解决??在unity里选中资源 1.TextureType 改成 Advanced2.NonPower of 2 改成 no ...

  7. Ribbon远程调用

    Ribbon是客户端的负载均衡机制,它有几种负载均衡机制.默认是轮询,我们也可以自定义规则.通过合理的分配网络请求来减小服务器的压力.项目都是注册到eureka服务器上.通过ribbon去调用其他服务 ...

  8. jQuery——复选框操作

    学习jQuer对表单.表格操作的过程中,按照书上的例子发现一个问题: <!DOCTYPE html> <html> <head> <title>复选框应 ...

  9. C# 实现实体类和Xml转换

    一.实体类转换成XML 将实体类转换成XML需要使用XmlSerializer类的Serialize方法,将实体类序列化 public static string XmlSerialize<T& ...

  10. 2018-8-27-C#-powshell-调用

    title author date CreateTime categories C# powshell 调用 lindexi 2018-8-27 16:20:4 +0800 2018-06-18 20 ...