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

技术图片

 

 

文章来自:https://www.cnblogs.com/jpfss/p/10765636.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3