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>

方法三:

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

 

 

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

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

1.

.è¿éåå¾çæè¿°

2

è¿éåå¾çæè¿°

3

è¿éåå¾çæè¿°

 

 

posted @ 2019-04-24 23:07  星朝  阅读(148532)  评论(0编辑  收藏  举报