新建的SpringBoot项目,点击启动,项目没有启动成功,但是不报错。如下:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.4)
2022-12-13 10:18:52.858 INFO 14232 --- [ main] c.k.s.SpringbootDemoApplication : Starting SpringbootDemoApplication using Java 1.8.0_202 on 2F-KF03 with PID 14232 (D:\i-word\springboot-demo\target\classes started by Administrator in D:\i-word\springboot-demo)
2022-12-13 10:18:52.860 INFO 14232 --- [ main] c.k.s.SpringbootDemoApplication : No active profile set, falling back to 1 default profile: "default"
2022-12-13 10:18:53.143 INFO 14232 --- [ main] c.k.s.SpringbootDemoApplication : Started SpringbootDemoApplication in 0.496 seconds (JVM running for 0.992)
Process finished with exit code 0
解决方案:
博主遇到的是没有引入spring-boot-starter-web所导致,引入对应pom文件即可解决问题
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>