先看一下错误

原因是少了web支持,只需要添加web的依赖就可以了
解决方案:在pom.xml文件中导入下边的依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
博客内容涉及Spring Boot应用中遇到的问题,即缺少web支持。通过在pom.xml文件中引入spring-boot-starter-web依赖,可以轻松解决该问题,确保项目能够正常运行。
先看一下错误

原因是少了web支持,只需要添加web的依赖就可以了
解决方案:在pom.xml文件中导入下边的依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
6987

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