新建Spring Boot项目可能的报错
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2021-04-10 21:05:32.213 ERROR 8820 — [main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tomcatServletWebServerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory]: Factory method ‘tomcatServletWebServerFactory’ threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
项目构建截图:
运行报错截图:
解决方法截图:
(可能可以解决问题)
重新新建项目可解决问题