前提:idea新建spring boot项目,不勾选(导入)任何依赖。

bug描述:项目无法启动,控制台报如下信息

解决方法:修改pom文件中的org.springframework.boot依赖信息:
修改前
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
修改后
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
SpringBoot项目启动问题
本文描述了一种在Idea中创建SpringBoot项目时遇到的问题,即项目无法启动,并给出了具体的解决办法。通过将依赖从'spring-boot-starter'更改为'spring-boot-starter-web',可以成功启动项目。

被折叠的 条评论
为什么被折叠?



