在IDEA中启动SpringBoot项目失败,报错以下:spring
Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
首先确认pom文件中的tomcat依赖包要配置以下:tomcat
若是是以上配置,须要检查启动配置是否勾选了ide
Include dependencies with "Provided" scope
选项。以下:code
若是没有勾选,勾选上便可。 注:IDEA版本为 2018.2 低版本中可能没有该选项。blog