首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean解决方案N种

Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean解决方案N种

作者头像
JavaEdge
发布2021-02-22 14:26:51
发布2021-02-22 14:26:51
1.6K0
举报
文章被收录于专栏:JavaEdgeJavaEdge

Spring Boot启动应用总是报错如下:

Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

与“Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean”如出一辙。

不是技术论坛中大家常说的应用入口类缺少@SpringBootApplication标注,或者是Spring bean缺少@EnableAutoConfiguration标注等问题。

是因为默认使用的嵌入式Tomcat容器无法启动。

解决的办法来了

  1. 删除Maven本地库中有错的tomcat-embed-core,再次构建下载新的tomcat-embed-core,构建错误消失,成功构建完成。
  2. 把嵌入的tomcat注释一下就可以了
  3. 我就是因为排除了嵌入式tomcat,指定本地的tomcat即可。
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/04/26 ,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档