Skip to content

Commit 67d37c4

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents a7cb111 + 502ccae commit 67d37c4

File tree

5 files changed

+31
-9
lines changed

5 files changed

+31
-9
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, th
293293
[[duplicate-finder-configuration]]
294294
=== Duplicate Finder configuration
295295

296-
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`.
296+
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the project's `pom.xml`.
297297

298298
.pom.xml
299299
[source,xml]

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"@antora/collector-extension": "1.0.1",
66
"@asciidoctor/tabs": "1.0.0-beta.6",
77
"@springio/antora-extensions": "1.14.4",
8-
"@springio/asciidoctor-extensions": "1.0.0-alpha.16"
8+
"@springio/asciidoctor-extensions": "1.0.0-alpha.17"
99
}
1010
}

spring-cloud-commons-dependencies/pom.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,10 @@
6060
<!-- This can be removed in the next major -->
6161
<dependency>
6262
<groupId>com.squareup.okhttp3</groupId>
63-
<artifactId>okhttp</artifactId>
64-
<version>${okhttp.version}</version>
65-
</dependency>
66-
<dependency>
67-
<groupId>com.squareup.okhttp3</groupId>
68-
<artifactId>logging-interceptor</artifactId>
63+
<artifactId>okhttp-bom</artifactId>
6964
<version>${okhttp.version}</version>
65+
<scope>import</scope>
66+
<type>pom</type>
7067
</dependency>
7168
</dependencies>
7269
</dependencyManagement>

spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/config/BootstrapConfigurationTests.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,6 +49,7 @@
4949

5050
/**
5151
* @author Dave Syer
52+
* @author Yanming Zhou
5253
*
5354
*/
5455
public class BootstrapConfigurationTests {
@@ -740,6 +741,23 @@ void activeAndIncludeProfileFromBootstrapPropertySource_WhenMultiplePlacesHaveAc
740741
.anyMatch("local"::equals)).isTrue();
741742
}
742743

744+
@Test // GH-1416
745+
public void bootstrapPropertiesWithActivateOnProfile() {
746+
String bootstrapLocation = "spring.cloud.bootstrap.location=classpath:external-properties/bootstrap.yaml";
747+
String legacyProcessing = "spring.config.use-legacy-processing=true";
748+
this.context = new SpringApplicationBuilder().web(WebApplicationType.NONE)
749+
.sources(BareConfiguration.class)
750+
.properties(bootstrapLocation, legacyProcessing)
751+
.run();
752+
then(this.context.getEnvironment().getProperty("info.name")).isEqualTo("externalPropertiesInfoName");
753+
754+
this.context = new SpringApplicationBuilder().web(WebApplicationType.NONE)
755+
.sources(BareConfiguration.class)
756+
.properties(bootstrapLocation, legacyProcessing, "spring.profiles.active=bar")
757+
.run();
758+
then(this.context.getEnvironment().getProperty("info.name")).isEqualTo("externalPropertiesInfoName from bar");
759+
}
760+
743761
@Configuration(proxyBeanMethods = false)
744762
@EnableConfigurationProperties
745763
protected static class BareConfiguration {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
spring.main.sources: org.springframework.cloud.bootstrap.config.BootstrapConfigurationTests.PropertySourceConfiguration
2+
info.name: externalPropertiesInfoName
3+
4+
---
5+
spring.config.activate.on-profile: bar
6+
info.name: externalPropertiesInfoName from bar
7+

0 commit comments

Comments
 (0)