parent
1ff070f6e9
commit
9c412232d5
|
@ -650,7 +650,9 @@ public class SpringApplication {
|
||||||
if (log.isInfoEnabled()) {
|
if (log.isInfoEnabled()) {
|
||||||
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
|
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
|
||||||
if (ObjectUtils.isEmpty(activeProfiles)) {
|
if (ObjectUtils.isEmpty(activeProfiles)) {
|
||||||
log.info("No profiles are active");
|
String[] defaultProfiles = context.getEnvironment().getDefaultProfiles();
|
||||||
|
log.info("No active profile set, falling back to default profiles: "
|
||||||
|
+ StringUtils.arrayToCommaDelimitedString(defaultProfiles));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log.info("The following profiles are active: "
|
log.info("The following profiles are active: "
|
||||||
|
|
|
@ -222,7 +222,8 @@ public class SpringApplicationTests {
|
||||||
SpringApplication application = new SpringApplication(ExampleConfig.class);
|
SpringApplication application = new SpringApplication(ExampleConfig.class);
|
||||||
application.setWebEnvironment(false);
|
application.setWebEnvironment(false);
|
||||||
this.context = application.run();
|
this.context = application.run();
|
||||||
assertThat(this.output.toString(), containsString("No profiles are active"));
|
assertThat(this.output.toString(), containsString(
|
||||||
|
"No active profile set, falling back to default profiles: default"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue