侧边栏壁纸
  • 累计撰写 1,958 篇文章
  • 累计创建 73 个标签
  • 累计收到 20 条评论

目 录CONTENT

文章目录

SpringBoot项目启动报错:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

猿哥
2021-10-24 / 0 评论 / 0 点赞 / 1,518 阅读 / 0 字
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方法写错了

0
博主关闭了所有页面的评论