项目场景:
在idea中按照spring-Initializr方式创建springboot项目,然后直接启动失败
问题描述
springboot项目启动失败
原因分析:
没有在pom文件中引入启动配置类的依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
解决方案:
添加启动配置类
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>