IntelliJ IDEA启动spring boot项目出现Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

IntelliJ IDEA启动spring boot项目出现Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

出现的错误日志见后面的附加信息;

学习了:http://blog.csdn.net/lanmo555/article/details/51435534 发现大概是servlet-api的问题,而且在日志中发现了

启动jar包中包含D:\Java\JetBrains\IntelliJIDEA\lib\servlet-api.jar;

该项目在sts中可以正确启动,应该是IntelliJ IDEA设置的问题;

而且该项目mvn install之后生成的jar包也可以java -jar xxx.jar正常运行;

学习了:https://www.cnblogs.com/jianzhixuan/p/6991503.html 估计以后部署在tomcat上面还需要填坑;

解决方法:

在IntelliJ IDEA中按F4,进入Project Structure,修改左侧Project、Modules,把其中的Project SDK修改为自己定义的jdk1.8;

重新启动项目就可以了;

观察现在输出的日志,里面就没有servlet-api.jar文件了。正确日志见后面附件。

 

 

错误日志:

D:\Java\jdk1.8.0_05\bin\java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=64090 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Didea.launcher.port=64091 -Didea.launcher.bin.path=D:\Java\JetBrains\IntelliJIDEA\bin -Dfile.encoding=UTF-8 -classpath D:\Java\JetBrains\IntelliJIDEA\lib\aether-1.1.0-all.jar;D:\Java\JetBrains\IntelliJIDEA\lib\aether-dependency-resolver.jar;D:\Java\JetBrains\IntelliJIDEA\lib\alloy.jar;D:\Java\JetBrains\IntelliJIDEA\lib\annotations.jar;D:\Java\JetBrains\IntelliJIDEA\lib\asm-5.0.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\asm-all.jar;D:\Java\JetBrains\IntelliJIDEA\lib\asm-analysis-5.0.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\asm-tree-5.0.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\automaton.jar;D:\Java\JetBrains\IntelliJIDEA\lib\batik-all.jar;D:\Java\JetBrains\IntelliJIDEA\lib\bcprov-jdk15on-155.jar;D:\Java\JetBrains\IntelliJIDEA\lib\boot.jar;D:\Java\JetBrains\IntelliJIDEA\lib\bootstrap.jar;D:\Java\JetBrains\IntelliJIDEA\lib\cglib-nodep-3.2.4.jar;D:\Java\JetBrains\IntelliJIDEA\lib\cli-parser-1.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\clojure-1.8.0.jar;D:\Java\JetBrains\IntelliJIDEA\lib\clojure-jsr223-1.5.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\cloud-config-client.jar;D:\Java\JetBrains\IntelliJIDEA\lib\common-image-3.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\common-io-3.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\common-lang-3.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\commons-codec-1.9.jar;D:\Java\JetBrains\IntelliJIDEA\lib\commons-compress-1.10.jar;D:\Java\JetBrains\IntelliJIDEA\lib\commons-httpclient-3.1-patched.jar;D:\Java\JetBrains\IntelliJIDEA\lib\commons-imaging-1.0-RC.jar;D:\Java\JetBrains\IntelliJIDEA\lib\commons-logging-1.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\commons-net-3.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\constraint-layout.jar;D:\Java\JetBrains\IntelliJIDEA\lib\coverage-agent.jar;D:\Java\JetBrains\IntelliJIDEA\lib\coverage-instrumenter.jar;D:\Java\JetBrains\IntelliJIDEA\lib\coverage-util.jar;D:\Java\JetBrains\IntelliJIDEA\lib\ecj-4.6.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\extensions.jar;D:\Java\JetBrains\IntelliJIDEA\lib\external-system-rt.jar;D:\Java\JetBrains\IntelliJIDEA\lib\fest-assert-1.5.0-SNAPSHOT.jar;D:\Java\JetBrains\IntelliJIDEA\lib\fest-reflect-2.0-SNAPSHOT.jar;D:\Java\JetBrains\IntelliJIDEA\lib\fest-swing-1.4.1-SNAPSHOT.jar;D:\Java\JetBrains\IntelliJIDEA\lib\fest-util-1.3.0-SNAPSHOT.jar;D:\Java\JetBrains\IntelliJIDEA\lib\fluent-hc-4.5.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\forms_rt.jar;D:\Java\JetBrains\IntelliJIDEA\lib\google-analytics-library.jar;D:\Java\JetBrains\IntelliJIDEA\lib\groovy-all-2.4.12.jar;D:\Java\JetBrains\IntelliJIDEA\lib\gson-2.8.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\guava-21.0.jar;D:\Java\JetBrains\IntelliJIDEA\lib\hamcrest-core-1.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\httpclient-4.5.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\httpcore-4.4.5.jar;D:\Java\JetBrains\IntelliJIDEA\lib\httpmime-4.5.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\icons.jar;D:\Java\JetBrains\IntelliJIDEA\lib\idea-jsp-openapi.jar;D:\Java\JetBrains\IntelliJIDEA\lib\idea.jar;D:\Java\JetBrains\IntelliJIDEA\lib\ideax.jar;D:\Java\JetBrains\IntelliJIDEA\lib\idea_rt.jar;D:\Java\JetBrains\IntelliJIDEA\lib\imageio-core-3.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\imageio-metadata-3.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\imageio-tiff-3.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\imgscalr-lib-4.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\ini4j-0.5.2-patched.jar;D:\Java\JetBrains\IntelliJIDEA\lib\isorelax.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jasper21_rt.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jasper2_rt.jar;D:\Java\JetBrains\IntelliJIDEA\lib\javac2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jaxen-1.1.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jayatana-1.2.4.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jcip-annotations.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jdkAnnotations.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jdom.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jediterm-pty-2.5.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jettison-1.3.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jgoodies-common-1.2.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jgoodies-forms.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jgoodies-looks-2.4.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jh.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jimfs-1.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jing.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jna-platform.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jna.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jps-builders-6.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jps-builders.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jps-launcher.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jps-model.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch-0.1.54.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.connector-factory.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.core.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.jsch.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.pageant.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.sshagent.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.usocket-jna.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsch.agentproxy.usocket-nc.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jshell-frontend.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jshell-protocol.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsp-api.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsr173_1.0_api.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jsr305.jar;D:\Java\JetBrains\IntelliJIDEA\lib\junit-4.12.jar;D:\Java\JetBrains\IntelliJIDEA\lib\jzlib-1.1.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\kotlin-reflect.jar;D:\Java\JetBrains\IntelliJIDEA\lib\kotlin-runtime.jar;D:\Java\JetBrains\IntelliJIDEA\lib\log4j.jar;D:\Java\JetBrains\IntelliJIDEA\lib\markdown4j-2.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\markdownj-core-0.4.2-SNAPSHOT.jar;D:\Java\JetBrains\IntelliJIDEA\lib\maven-aether-provider-3.3.9-all.jar;D:\Java\JetBrains\IntelliJIDEA\lib\microba.jar;D:\Java\JetBrains\IntelliJIDEA\lib\miglayout-core-5.0.jar;D:\Java\JetBrains\IntelliJIDEA\lib\miglayout-swing-5.0.jar;D:\Java\JetBrains\IntelliJIDEA\lib\MultithreadedTC-1.01.jar;D:\Java\JetBrains\IntelliJIDEA\lib\nanoxml-2.2.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\nekohtml-1.9.14.jar;D:\Java\JetBrains\IntelliJIDEA\lib\netty-all-4.1.13.Final.jar;D:\Java\JetBrains\IntelliJIDEA\lib\openapi.jar;D:\Java\JetBrains\IntelliJIDEA\lib\optimizedFileManager.jar;D:\Java\JetBrains\IntelliJIDEA\lib\oromatcher.jar;D:\Java\JetBrains\IntelliJIDEA\lib\picocontainer.jar;D:\Java\JetBrains\IntelliJIDEA\lib\protobuf-java-2.5.0.jar;D:\Java\JetBrains\IntelliJIDEA\lib\proxy-vole-1.0.3.jar;D:\Java\JetBrains\IntelliJIDEA\lib\pty4j-0.7.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\purejavacomm.jar;D:\Java\JetBrains\IntelliJIDEA\lib\resolver.jar;D:\Java\JetBrains\IntelliJIDEA\lib\resources.jar;D:\Java\JetBrains\IntelliJIDEA\lib\resources_en.jar;D:\Java\JetBrains\IntelliJIDEA\lib\rhino-js-1_7R4.jar;D:\Java\JetBrains\IntelliJIDEA\lib\rngom-20051226-patched.jar;D:\Java\JetBrains\IntelliJIDEA\lib\serviceMessages.jar;D:\Java\JetBrains\IntelliJIDEA\lib\servlet-api.jar;D:\Java\JetBrains\IntelliJIDEA\lib\slf4j-api-1.7.10.jar;D:\Java\JetBrains\IntelliJIDEA\lib\slf4j-log4j12-1.7.10.jar;D:\Java\JetBrains\IntelliJIDEA\lib\snakeyaml-1.17.jar;D:\Java\JetBrains\IntelliJIDEA\lib\snappy-in-java-0.5.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\sqlite-jdbc-3.16.1.jar;D:\Java\JetBrains\IntelliJIDEA\lib\streamex-0.6.5.jar;D:\Java\JetBrains\IntelliJIDEA\lib\studio-profiler-grpc-1.0-jarjar.jar;D:\Java\JetBrains\IntelliJIDEA\lib\swingx-core-1.6.2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\trang-core.jar;D:\Java\JetBrains\IntelliJIDEA\lib\trilead-ssh2.jar;D:\Java\JetBrains\IntelliJIDEA\lib\trove4j.jar;D:\Java\JetBrains\IntelliJIDEA\lib\util.jar;D:\Java\JetBrains\IntelliJIDEA\lib\velocity.jar;D:\Java\JetBrains\IntelliJIDEA\lib\wadl-core.jar;D:\Java\JetBrains\IntelliJIDEA\lib\winp-1.23.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xbean.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xercesImpl.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xml-apis-ext.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xmlgraphics-commons-1.5.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xmlrpc-2.0.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xpp3-1.1.4-min.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xstream-1.4.8.jar;D:\Java\JetBrains\IntelliJIDEA\lib\xz-1.5.jar;D:\Java\JetBrains\IntelliJIDEA\lib\yjp-controller-api-redist.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\JavaEE\lib\gradle-javaee.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\JavaEE\lib\IntelliLang-javaee.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\JavaEE\lib\javaee-jps-plugin.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\JavaEE\lib\javaee-openapi.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\JavaEE\lib\resources_en.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\JavaEE\lib\webDeployment-transport.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\PersistenceSupport\lib\persistence-openapi.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\PersistenceSupport\lib\resources_en.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\DatabaseTools\lib\database-openapi.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\DatabaseTools\lib\dekaf-single-2.0.0.339.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\DatabaseTools\lib\resources_en.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\DatabaseTools\lib\unidecode-0.0.7.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\CSS\lib\css-openapi.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\CSS\lib\resources_en.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\uml\lib\diagram-api.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\Spring\lib\spring-aop.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\Spring\lib\spring-api.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\Spring\lib\spring-eclipse.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\Spring\lib\spring-graph.jar;D:\Java\JetBrains\IntelliJIDEA\plugins\Spring\lib\spring-web.jar;D:\Java\jdk1.8.0_05\jre\lib\charsets.jar;D:\Java\jdk1.8.0_05\jre\lib\deploy.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\access-bridge-64.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\cldrdata.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\dnsns.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\jaccess.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\jfxrt.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\localedata.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\nashorn.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunec.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunjce_provider.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunmscapi.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunpkcs11.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\zipfs.jar;D:\Java\jdk1.8.0_05\jre\lib\javaws.jar;D:\Java\jdk1.8.0_05\jre\lib\jce.jar;D:\Java\jdk1.8.0_05\jre\lib\jfr.jar;D:\Java\jdk1.8.0_05\jre\lib\jfxswt.jar;D:\Java\jdk1.8.0_05\jre\lib\jsse.jar;D:\Java\jdk1.8.0_05\jre\lib\management-agent.jar;D:\Java\jdk1.8.0_05\jre\lib\plugin.jar;D:\Java\jdk1.8.0_05\jre\lib\resources.jar;D:\Java\jdk1.8.0_05\jre\lib\rt.jar;D:\Java\IdeaProjects\learn\target\classes;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter-web\1.5.9.RELEASE\spring-boot-starter-web-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter\1.5.9.RELEASE\spring-boot-starter-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot\1.5.9.RELEASE\spring-boot-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-autoconfigure\1.5.9.RELEASE\spring-boot-autoconfigure-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter-logging\1.5.9.RELEASE\spring-boot-starter-logging-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-core\4.3.13.RELEASE\spring-core-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.9.RELEASE\spring-boot-starter-tomcat-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.23\tomcat-embed-core-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\tomcat-annotations-api\8.5.23\tomcat-annotations-api-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.23\tomcat-embed-el-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.23\tomcat-embed-websocket-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;E:\apache-maven-3.3.9-bin\Local_repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-web\4.3.13.RELEASE\spring-web-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-aop\4.3.13.RELEASE\spring-aop-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-beans\4.3.13.RELEASE\spring-beans-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-context\4.3.13.RELEASE\spring-context-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-webmvc\4.3.13.RELEASE\spring-webmvc-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-expression\4.3.13.RELEASE\spring-expression-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar com.intellij.rt.execution.application.AppMainV2 com.stono.learn.LearnApplication
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.9.RELEASE)

十二月 30, 2017 8:04:09 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Tomcat]
十二月 30, 2017 8:04:09 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.23
十二月 30, 2017 8:04:10 上午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
	... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5117)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
	at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 8 more
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
	at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1141)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 10 more

十二月 30, 2017 8:04:10 上午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:99)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:84)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
	at com.stono.learn.LearnApplication.main(LearnApplication.java:10)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:948)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 6 more


Process finished with exit code 1

正确日志:

D:\Java\jdk1.8.0_05\bin\java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=65221 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:D:\Java\JetBrains\IntelliJIDEA\lib\idea_rt.jar=65222:D:\Java\JetBrains\IntelliJIDEA\bin -Dfile.encoding=UTF-8 -classpath D:\Java\jdk1.8.0_05\jre\lib\charsets.jar;D:\Java\jdk1.8.0_05\jre\lib\deploy.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\access-bridge-64.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\cldrdata.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\dnsns.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\jaccess.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\jfxrt.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\localedata.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\nashorn.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunec.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunjce_provider.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunmscapi.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\sunpkcs11.jar;D:\Java\jdk1.8.0_05\jre\lib\ext\zipfs.jar;D:\Java\jdk1.8.0_05\jre\lib\javaws.jar;D:\Java\jdk1.8.0_05\jre\lib\jce.jar;D:\Java\jdk1.8.0_05\jre\lib\jfr.jar;D:\Java\jdk1.8.0_05\jre\lib\jfxswt.jar;D:\Java\jdk1.8.0_05\jre\lib\jsse.jar;D:\Java\jdk1.8.0_05\jre\lib\management-agent.jar;D:\Java\jdk1.8.0_05\jre\lib\plugin.jar;D:\Java\jdk1.8.0_05\jre\lib\resources.jar;D:\Java\jdk1.8.0_05\jre\lib\rt.jar;D:\Java\IdeaProjects\learn\target\classes;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter-web\1.5.9.RELEASE\spring-boot-starter-web-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter\1.5.9.RELEASE\spring-boot-starter-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot\1.5.9.RELEASE\spring-boot-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-autoconfigure\1.5.9.RELEASE\spring-boot-autoconfigure-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter-logging\1.5.9.RELEASE\spring-boot-starter-logging-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-core\4.3.13.RELEASE\spring-core-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.9.RELEASE\spring-boot-starter-tomcat-1.5.9.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.23\tomcat-embed-core-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\tomcat-annotations-api\8.5.23\tomcat-annotations-api-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.23\tomcat-embed-el-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.23\tomcat-embed-websocket-8.5.23.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;E:\apache-maven-3.3.9-bin\Local_repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;E:\apache-maven-3.3.9-bin\Local_repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-web\4.3.13.RELEASE\spring-web-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-aop\4.3.13.RELEASE\spring-aop-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-beans\4.3.13.RELEASE\spring-beans-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-context\4.3.13.RELEASE\spring-context-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-webmvc\4.3.13.RELEASE\spring-webmvc-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\springframework\spring-expression\4.3.13.RELEASE\spring-expression-4.3.13.RELEASE.jar;E:\apache-maven-3.3.9-bin\Local_repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar com.stono.learn.LearnApplication
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.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.9.RELEASE)

十二月 30, 2017 8:41:02 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Tomcat]
十二月 30, 2017 8:41:02 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.23
十二月 30, 2017 8:41:02 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring embedded WebApplicationContext
十二月 30, 2017 8:41:18 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'dispatcherServlet'

 

点赞