原因
没有配置启动依赖
解决1
配置如下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
解决2
如果依赖配置了,打开Edit Configurations
spring.profiles.active=application
没有配置启动依赖
配置如下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
如果依赖配置了,打开Edit Configurations
spring.profiles.active=application