SpringBoot: No active profile set, falling back to default profiles: default , 不一定是依赖的问题

No active profile set, falling back to default profiles: default

SpringBoot发布的时候发现出现这个错误 , 当然这个错误一搜就有答案 , 

 大部分是依赖的问题 , 需要看一下是否缺少这两个(我们项目不是cloud的 ,所有只需要第一个) , 如果是cloud项目则需要第二个

<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文件 , 重新clean package无数遍 , 

最终发现 , linux命令输入错误 , 因为nohup 

(1) nohup 

加在一个命令的最前面,表示不挂断的运行命令

(2) &

加载一个命令的最后面,表示这个命令放在后台执行

就是因为少打了一个& , 被log文件的错误带跑偏了

原文地址:https://www.cnblogs.com/sunjinggege/p/14336186.html