zoukankan      html  css  js  c++  java
  • intellij idea 用 Gradle新建 spring boot

    intellij idea用的是ideaIU-2017.1.4  。spring boot用的是2.10

    出现错误 

    ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
    Exception in thread "main" java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.<clinit>(LogbackLoggingSystem.java:70)
    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.lambda$get$1(LoggingSystem.java:161)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet.lambda$entryConsumer$0(Collections.java:1575)
    at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
    at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntrySetSpliterator.tryAdvance(Collections.java:1594)
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
    at org.springframework.boot.logging.LoggingSystem.get(LoggingSystem.java:161)
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:216)
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:196)

    增加 log4j-core 后也不行 ,控制台就会出现

    Exception in thread "main" java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    错误。

    后来我用  spring boot用的是1.56 就不会出现这个问题,正常运行

    最后重新安装了ideaIU-2018.2.6 ,在用spring boot 2.10就没问题了 

  • 相关阅读:
    垃圾收集器与内存分配策略(二)之垃圾收集算法
    组合与继承
    垃圾收集器与内存分配策略(一)之对象存活判断
    虚拟机中对象的创建、内存布局、访问
    Java运行时数据区域划分
    Java操作excel表格
    位段
    sh -s用法
    ubutu14.04选中文本就会删除问题解决
    java容器-List
  • 原文地址:https://www.cnblogs.com/jialiguo/p/9969254.html
Copyright © 2011-2022 走看看