From 9443efc79961708a0041e5c768304a22ebdc4506 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 20 Jun 2019 16:40:17 +0000 Subject: [PATCH 1/5] Update SNAPSHOT to 2.1.3.RELEASE --- README.adoc | 2 +- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 4 ++-- spring-cloud-config-monitor/pom.xml | 4 ++-- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.adoc b/README.adoc index d525e0f9..48ab1254 100644 --- a/README.adoc +++ b/README.adoc @@ -257,7 +257,7 @@ credentials and you already have those. The projects that require middleware generally include a `docker-compose.yml`, so consider using -https://compose.docker.io/[Docker Compose] to run the middeware servers +https://docs.docker.com/compose/[Docker Compose] to run the middeware servers in Docker containers. See the README in the https://github.com/spring-cloud-samples/scripts[scripts demo repository] for specific instructions about the common cases of mongo, diff --git a/docs/pom.xml b/docs/pom.xml index 7ad3a377..fed81a7a 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE .. diff --git a/pom.xml b/pom.xml index 17749677..322f0d10 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.1.4.BUILD-SNAPSHOT + 2.1.5.RELEASE @@ -27,7 +27,7 @@ config - 2.1.2.BUILD-SNAPSHOT + 2.1.2.RELEASE true true diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index a14c6fb8..12bbf709 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index f86cf856..a5556228 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -6,11 +6,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.1.4.BUILD-SNAPSHOT + 2.1.5.RELEASE spring-cloud-config-dependencies - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index 4a77b3d4..23186e3f 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 2.1.1.BUILD-SNAPSHOT + 2.1.2.RELEASE diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 4b47428b..685a9329 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 51663ebf..ac478e92 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index aedadef5..a586b4cd 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -6,10 +6,10 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE spring-cloud-starter-config - 2.1.4.BUILD-SNAPSHOT + 2.1.3.RELEASE spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 5d66e0fb093eebfdbc190a96ad0cacda09f2d1df Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 20 Jun 2019 16:41:39 +0000 Subject: [PATCH 2/5] Going back to snapshots --- README.adoc | 2 +- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 4 ++-- spring-cloud-config-monitor/pom.xml | 4 ++-- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.adoc b/README.adoc index 48ab1254..d525e0f9 100644 --- a/README.adoc +++ b/README.adoc @@ -257,7 +257,7 @@ credentials and you already have those. The projects that require middleware generally include a `docker-compose.yml`, so consider using -https://docs.docker.com/compose/[Docker Compose] to run the middeware servers +https://compose.docker.io/[Docker Compose] to run the middeware servers in Docker containers. See the README in the https://github.com/spring-cloud-samples/scripts[scripts demo repository] for specific instructions about the common cases of mongo, diff --git a/docs/pom.xml b/docs/pom.xml index fed81a7a..7ad3a377 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 322f0d10..17749677 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.1.5.RELEASE + 2.1.4.BUILD-SNAPSHOT @@ -27,7 +27,7 @@ config - 2.1.2.RELEASE + 2.1.2.BUILD-SNAPSHOT true true diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 12bbf709..a14c6fb8 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index a5556228..f86cf856 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -6,11 +6,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.1.5.RELEASE + 2.1.4.BUILD-SNAPSHOT spring-cloud-config-dependencies - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index 23186e3f..4a77b3d4 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 2.1.2.RELEASE + 2.1.1.BUILD-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 685a9329..4b47428b 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index ac478e92..51663ebf 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a586b4cd..aedadef5 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -6,10 +6,10 @@ org.springframework.cloud spring-cloud-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT spring-cloud-starter-config - 2.1.3.RELEASE + 2.1.4.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From ef9163a02a46f222c883bc1e383bac05c145dbfd Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 20 Jun 2019 16:41:39 +0000 Subject: [PATCH 3/5] Bumping versions to 2.1.5.BUILD-SNAPSHOT after release --- docs/pom.xml | 2 +- pom.xml | 2 +- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 2 +- spring-cloud-config-monitor/pom.xml | 2 +- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 7ad3a377..f9314bb8 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 17749677..3802429d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index a14c6fb8..98e8fec4 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index f86cf856..5abe2879 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -10,7 +10,7 @@ spring-cloud-config-dependencies - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index 4a77b3d4..d3bd9010 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT .. spring-cloud-config-monitor diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 4b47428b..6eaf8414 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 51663ebf..9b89c0af 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index aedadef5..166486b7 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -6,10 +6,10 @@ org.springframework.cloud spring-cloud-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT spring-cloud-starter-config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From dfa31c918a7d1b4390790c4a5149a3a26935016b Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Fri, 21 Jun 2019 12:09:06 -0400 Subject: [PATCH 4/5] Bumps 2.1.4.BUILD-SNAPSHOT and build to 2.1.7 --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 4 ++-- spring-cloud-config-monitor/pom.xml | 2 +- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index f9314bb8..7ad3a377 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 3802429d..0fdca409 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.1.4.BUILD-SNAPSHOT + 2.1.7.BUILD-SNAPSHOT @@ -27,7 +27,7 @@ config - 2.1.2.BUILD-SNAPSHOT + 2.1.3.BUILD-SNAPSHOT true true diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 98e8fec4..a14c6fb8 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 5abe2879..97d80182 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -6,11 +6,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.1.4.BUILD-SNAPSHOT + 2.1.7.BUILD-SNAPSHOT spring-cloud-config-dependencies - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index d3bd9010..4a77b3d4 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT .. spring-cloud-config-monitor diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 6eaf8414..4b47428b 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 9b89c0af..51663ebf 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 166486b7..aedadef5 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -6,10 +6,10 @@ org.springframework.cloud spring-cloud-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT spring-cloud-starter-config - 2.1.5.BUILD-SNAPSHOT + 2.1.4.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From b33ddb9bce47b2ef20507a144cda3e9013780ef6 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Thu, 18 Jul 2019 12:04:16 -0400 Subject: [PATCH 5/5] Fix logic when placeholder is at the end of the URL. (#1429) --- ...ClientConfigurableHttpConnectionFactory.java | 7 ++++++- ...ntConfigurableHttpConnectionFactoryTest.java | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactory.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactory.java index 31a0ac2c..98743df2 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactory.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactory.java @@ -117,7 +117,9 @@ public class HttpClientConfigurableHttpConnectionFactory private String getUrlWithPlaceholders(URL url, String key) { String spec = url.toString(); String[] tokens = key.split(PLACEHOLDER_PATTERN); - if (tokens.length > 1) { + // if token[0] equals url then there was no placeholder in the the url, so + // matching needed + if (tokens.length >= 1 && !tokens[0].equals(url.toString())) { List placeholders = getPlaceholders(key); List values = getValues(spec, tokens); if (placeholders.size() == values.size()) { @@ -141,6 +143,9 @@ public class HttpClientConfigurableHttpConnectionFactory spec = valueTokens[1]; } } + if (tokens.length == 1 && !StringUtils.isEmpty(spec)) { + values.add(spec); + } return values; } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactoryTest.java index d749fefe..cb5f5cca 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/HttpClientConfigurableHttpConnectionFactoryTest.java @@ -104,6 +104,23 @@ public class HttpClientConfigurableHttpConnectionFactoryTest { assertThat(actualHttpClientBuilder).isSameAs(expectedHttpClientBuilder); } + @Test + public void urlWithPlaceholdersAtEnd() throws Exception { + MultipleJGitEnvironmentProperties properties = new MultipleJGitEnvironmentProperties(); + properties.setUri("https://localhost/v1/repos/pvvts_configs-{application}"); + this.connectionFactory.addConfiguration(properties); + + HttpConnection actualConnection = this.connectionFactory.create( + new URL("https://localhost/v1/repos/pvvts_configs-applicationPasswords" + + "/some/path.properties")); + + HttpClientBuilder expectedHttpClientBuilder = this.connectionFactory.httpClientBuildersByUri + .values().stream().findFirst().get(); + HttpClientBuilder actualHttpClientBuilder = getActualHttpClientBuilder( + actualConnection); + assertThat(actualHttpClientBuilder).isSameAs(expectedHttpClientBuilder); + } + @Test public void composite_sameHost() throws Exception { MultipleJGitEnvironmentProperties properties1 = new MultipleJGitEnvironmentProperties();