SpringBoot项目启动报错:
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

原因:
一,在main方法所在的类忘记添加@SpringBootApplication
二,缺少依赖,添加即可
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
三、或者是main方法写错了

大T笔记所有文章均为本人原创,转载请您注明来源,并留下原文链接地址,是对我的尊重,也是对知识的尊重,谢谢!
大T笔记 » SpringBoot项目启动报错:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
大T笔记 » SpringBoot项目启动报错:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.