Springboot 项目启动不了解决方案

201 阅读1分钟

IDEA 启动springboot项目时如果遇到闪退情况,如下图,一般是因为pom.xml中没有引入spring web依赖 image.png

引入WEB依赖包


<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

执行mvn clean 后重启服务即可

image.png