IDEA 下springboot啓動內置tomcat失敗問題

在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

相關文章
相關標籤/搜索