启动 Spring Boot 失败,但是没有出现多余的异常信息:

Spring Boot 启动:No active profile set, falling back to default profiles: default

检查之后发现是依赖的问题(之前依赖的是 spring-boot-starter),修改即可:

Spring Boot 启动:No active profile set, falling back to default profiles: default 

方法二:

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>

方法三:

Q:在springcloud多模块下创建一个新的server模块,但在好几个同事那里运行就没有报错,我这边就一直报这个错,经过一番挣扎后,最终在日志中发现了这个错“No active profile set, falling back to default profiles: default”

 

Spring Boot 启动:No active profile set, falling back to default profiles: default

 

但我这边有对应的配置文件:

Spring Boot 启动:No active profile set, falling back to default profiles: default

A:最后没办法只能是手动配置:

1.

.Spring Boot 启动:No active profile set, falling back to default profiles: default

2

Spring Boot 启动:No active profile set, falling back to default profiles: default

3

Spring Boot 启动:No active profile set, falling back to default profiles: default

 

 

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>

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2021-11-17
  • 2021-06-04
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2021-06-09
  • 2021-12-09
  • 2022-01-31
  • 2022-12-23
相关资源
相似解决方案