Spring Boot 启动:No active profile set, falling back to default profiles: default
启动 Spring Boot 失败,但是没有出现多余的异常信息:
检查之后发现是依赖的问题(之前依赖的是 spring-boot-starter),修改即可:
方法二:
pom.xml加上下面两个依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
pom.xml加上下面两个依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>