From 79e51f250351a32188a873cdef653f865283535d Mon Sep 17 00:00:00 2001 From: Haytham Mohamed Date: Mon, 16 Sep 2019 13:19:58 -0500 Subject: [PATCH 1/7] documentation change to use application instead of name in resource paths fixes gh-1466 --- docs/src/main/asciidoc/spring-cloud-config.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-config.adoc b/docs/src/main/asciidoc/spring-cloud-config.adoc index fda29967..4fd9b194 100644 --- a/docs/src/main/asciidoc/spring-cloud-config.adoc +++ b/docs/src/main/asciidoc/spring-cloud-config.adoc @@ -1046,7 +1046,7 @@ TIP: If you testing with curl, then use `--data-urlencode` (instead of `-d`) or Take the encrypted value and add the `{cipher}` prefix before you put it in the YAML or properties file and before you commit and push it to a remote (potentially insecure) store. -The `/encrypt` and `/decrypt` endpoints also both accept paths in the form of `/*/{name}/{profiles}`, which can be used to control cryptography on a per-application (name) and per-profile basis when clients call into the main environment resource. +The `/encrypt` and `/decrypt` endpoints also both accept paths in the form of `/*/{application}/{profiles}`, which can be used to control cryptography on a per-application (name) and per-profile basis when clients call into the main environment resource. NOTE: To control the cryptography in this granular way, you must also provide a `@Bean` of type `TextEncryptorLocator` that creates a different encryptor per name and profiles. The one that is provided by default does not do so (all encryptions use the same key). @@ -1176,7 +1176,7 @@ Also, the YAML representation is not necessarily a faithful representation of th == Serving Plain Text Instead of using the `Environment` abstraction (or one of the alternative representations of it in YAML or properties format), your applications might need generic plain-text configuration files that are tailored to their environment. -The Config Server provides these through an additional endpoint at `/{name}/{profile}/{label}/{path}`, where `name`, `profile`, and `label` have the same meaning as the regular environment endpoint, but `path` is a file name (such as `log.xml`). +The Config Server provides these through an additional endpoint at `/{application}/{profile}/{label}/{path}`, where `application`, `profile`, and `label` have the same meaning as the regular environment endpoint, but `path` is a path to a file name (such as `log.xml`). The source files for this endpoint are located in the same way as for the environment endpoints. The same search path is used for properties and YAML files. However, instead of aggregating all matching resources, only the first one to match is returned. @@ -1289,8 +1289,8 @@ However, by default, it looks for changes in files that match the application na The strategy to use when you want to override the behavior is `PropertyPathNotificationExtractor`, which accepts the request headers and body as parameters and returns a list of file paths that changed. The default configuration works out of the box with Github, Gitlab, Gitea, Gitee, Gogs or Bitbucket. -In addition to the JSON notifications from Github, Gitlab, Gitee, or Bitbucket, you can trigger a change notification by POSTing to `/monitor` with form-encoded body parameters in the pattern of `path={name}`. -Doing so broadcasts to applications matching the `{name}` pattern (which can contain wildcards). +In addition to the JSON notifications from Github, Gitlab, Gitee, or Bitbucket, you can trigger a change notification by POSTing to `/monitor` with form-encoded body parameters in the pattern of `path={application}`. +Doing so broadcasts to applications matching the `{application}` pattern (which can contain wildcards). NOTE: The `RefreshRemoteApplicationEvent` is transmitted only if the `spring-cloud-bus` is activated in both the Config Server and in the client application. @@ -1361,7 +1361,7 @@ Spring Retry has a `RetryInterceptorBuilder` that supports creating one. === Locating Remote Configuration Resources -The Config Service serves property sources from `/{name}/{profile}/{label}`, where the default bindings in the client app are as follows: +The Config Service serves property sources from `/{application}/{profile}/{label}`, where the default bindings in the client app are as follows: * "name" = `${spring.application.name}` * "profile" = `${spring.profiles.active}` (actually `Environment.getActiveProfiles()`) From 964a8005645c35c7588c08570e3bf942c7e64488 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Tue, 12 Nov 2019 12:35:06 -0500 Subject: [PATCH 2/7] Return HTTP Client of configuration if there is an exact match on the git url and not a placeholder --- ...lientConfigurableHttpConnectionFactory.java | 8 ++++++++ ...efreshableConfigServerIntegrationTests.java | 6 +++--- ...tConfigurableHttpConnectionFactoryTest.java | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) 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 98743df2..7aa975fe 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 @@ -105,6 +105,14 @@ public class HttpClientConfigurableHttpConnectionFactory return HttpClients.custom(); } if (builderMap.size() > 1) { + List keys = builderMap.keySet().stream().filter(key -> { + String[] tokens = key.split(PLACEHOLDER_PATTERN); + return tokens.length == 1; + }).collect(Collectors.toList()); + + if (keys.size() == 1) { + return builderMap.get(keys.get(0)); + } this.log.error(String.format( "More than one git repo URL template matched URL:" + " %s, proxy and skipSslValidation config won't be applied. Matched templates: %s", diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java index ebc59d8d..10991e44 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java @@ -79,9 +79,9 @@ public class RefreshableConfigServerIntegrationTests { } /* - * We're emulating an application "foo" which is running with the "development" profile - * and is asking for its properties using the REST endpoint. We're also calling the - * /env & /refresh actuator endpoints to change the + * We're emulating an application "foo" which is running with the "development" + * profile and is asking for its properties using the REST endpoint. We're also + * calling the /env & /refresh actuator endpoints to change the * `spring.cloud.config.server.overrides.foo` property. Since we see that we only get * the overridden "foo" property after the context refresh we are sure that the * properties have been set and the EnvironmentController bean has successfully been 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 cb5f5cca..71bfa827 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 @@ -159,6 +159,24 @@ public class HttpClientConfigurableHttpConnectionFactoryTest { assertThat(actualHttpClientBuilder).isSameAs(expectedHttpClientBuilder); } + @Test + public void multipleMatchesWithPlaceholder() throws Exception { + MultipleJGitEnvironmentProperties properties1 = new MultipleJGitEnvironmentProperties(); + properties1.setUri("https://github.com/marnee01/mderider-{application}.git"); + MultipleJGitEnvironmentProperties properties2 = new MultipleJGitEnvironmentProperties(); + properties2.setUri("https://github.com/marnee01/mderider-MultiApps.git"); + this.connectionFactory.addConfiguration(properties1); + this.connectionFactory.addConfiguration(properties2); + + HttpConnection actualConnection = this.connectionFactory.create(new URL( + "https://github.com/marnee01/mderider-MultiApps.git/info/refs?service=git-upload-pack")); + HttpClientBuilder expectedHttpClientBuilder = this.connectionFactory.httpClientBuildersByUri + .get(properties2.getUri()); + HttpClientBuilder actualHttpClientBuilder = getActualHttpClientBuilder( + actualConnection); + assertThat(actualHttpClientBuilder).isSameAs(expectedHttpClientBuilder); + } + @Test public void composite_urlsWithPlaceholders() throws Exception { MultipleJGitEnvironmentProperties properties1 = new MultipleJGitEnvironmentProperties(); From 7dbea8b818f813330cf1fc4de147dbbfd9d92063 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Tue, 12 Nov 2019 12:39:18 -0500 Subject: [PATCH 3/7] Removing resource class circleci config --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf0f6104..c21397c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,6 @@ jobs: branches: ignore: - gh-pages # list of branches to ignore - resource_class: large steps: - checkout - restore_cache: @@ -37,4 +36,4 @@ jobs: destination: artifacts - store_test_results: path: ~/junit/ - destination: testartifacts \ No newline at end of file + destination: testartifacts From c6778672d6cda503bba9522a5dd09aac52a8f800 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 18 Nov 2019 14:45:16 +0000 Subject: [PATCH 4/7] Update SNAPSHOT to 2.1.5.RELEASE --- README.adoc | 5 +++-- 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 +- .../server/RefreshableConfigServerIntegrationTests.java | 6 +++--- spring-cloud-starter-config/pom.xml | 4 ++-- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.adoc b/README.adoc index d525e0f9..4bace665 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, @@ -459,6 +459,7 @@ $ touch .springformat ==== Intellij IDEA In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin. +The following files can be found in the https://github.com/spring-cloud/spring-cloud-build/tree/master/spring-cloud-build-tools[Spring Cloud Build] project. .spring-cloud-build-tools/ ---- @@ -499,7 +500,7 @@ image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables: -- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL. +- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL. - `checkstyle.suppressions.file` - default suppressions. Please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` URL. - `checkstyle.additional.suppressions.file` - this variable corresponds to suppressions in your local project. E.g. you're working on `spring-cloud-contract`. Then point to the `project-root/src/checkstyle/checkstyle-suppressions.xml` folder. Example for `spring-cloud-contract` would be: `/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml`. diff --git a/docs/pom.xml b/docs/pom.xml index f9314bb8..a69752e2 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.5.RELEASE .. diff --git a/pom.xml b/pom.xml index 5d30012f..31fc6e46 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.5.RELEASE pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.1.8.BUILD-SNAPSHOT + 2.1.9.RELEASE @@ -27,7 +27,7 @@ config - 2.1.4.BUILD-SNAPSHOT + 2.1.4.RELEASE true true diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 98e8fec4..06b0cfff 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.5.RELEASE .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 53f5608d..ac506389 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.8.BUILD-SNAPSHOT + 2.1.9.RELEASE spring-cloud-config-dependencies - 2.1.5.BUILD-SNAPSHOT + 2.1.5.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 495ca478..c3a57688 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.5.RELEASE .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 2.1.4.BUILD-SNAPSHOT + 2.1.4.RELEASE diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 6eaf8414..d6e04293 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.5.RELEASE .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 9b89c0af..bab69c33 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.5.RELEASE .. diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java index ebc59d8d..10991e44 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java @@ -79,9 +79,9 @@ public class RefreshableConfigServerIntegrationTests { } /* - * We're emulating an application "foo" which is running with the "development" profile - * and is asking for its properties using the REST endpoint. We're also calling the - * /env & /refresh actuator endpoints to change the + * We're emulating an application "foo" which is running with the "development" + * profile and is asking for its properties using the REST endpoint. We're also + * calling the /env & /refresh actuator endpoints to change the * `spring.cloud.config.server.overrides.foo` property. Since we see that we only get * the overridden "foo" property after the context refresh we are sure that the * properties have been set and the EnvironmentController bean has successfully been diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 166486b7..c75102b7 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.5.RELEASE spring-cloud-starter-config - 2.1.5.BUILD-SNAPSHOT + 2.1.5.RELEASE spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 6a328954ac1eb458cb081fdc8bc08a42e303ddc8 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 18 Nov 2019 14:46:15 +0000 Subject: [PATCH 5/7] Going back to snapshots --- README.adoc | 5 ++--- 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 +- .../server/RefreshableConfigServerIntegrationTests.java | 6 +++--- spring-cloud-starter-config/pom.xml | 4 ++-- 10 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.adoc b/README.adoc index 4bace665..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, @@ -459,7 +459,6 @@ $ touch .springformat ==== Intellij IDEA In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin. -The following files can be found in the https://github.com/spring-cloud/spring-cloud-build/tree/master/spring-cloud-build-tools[Spring Cloud Build] project. .spring-cloud-build-tools/ ---- @@ -500,7 +499,7 @@ image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables: -- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL. +- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL. - `checkstyle.suppressions.file` - default suppressions. Please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` URL. - `checkstyle.additional.suppressions.file` - this variable corresponds to suppressions in your local project. E.g. you're working on `spring-cloud-contract`. Then point to the `project-root/src/checkstyle/checkstyle-suppressions.xml` folder. Example for `spring-cloud-contract` would be: `/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml`. diff --git a/docs/pom.xml b/docs/pom.xml index a69752e2..f9314bb8 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 2.1.5.RELEASE + 2.1.5.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 31fc6e46..5d30012f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 2.1.5.RELEASE + 2.1.5.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.1.9.RELEASE + 2.1.8.BUILD-SNAPSHOT @@ -27,7 +27,7 @@ config - 2.1.4.RELEASE + 2.1.4.BUILD-SNAPSHOT true true diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 06b0cfff..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.5.RELEASE + 2.1.5.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index ac506389..53f5608d 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.9.RELEASE + 2.1.8.BUILD-SNAPSHOT spring-cloud-config-dependencies - 2.1.5.RELEASE + 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 c3a57688..495ca478 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.RELEASE + 2.1.5.BUILD-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 2.1.4.RELEASE + 2.1.4.BUILD-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index d6e04293..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.5.RELEASE + 2.1.5.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index bab69c33..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.5.RELEASE + 2.1.5.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java index 10991e44..ebc59d8d 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/RefreshableConfigServerIntegrationTests.java @@ -79,9 +79,9 @@ public class RefreshableConfigServerIntegrationTests { } /* - * We're emulating an application "foo" which is running with the "development" - * profile and is asking for its properties using the REST endpoint. We're also - * calling the /env & /refresh actuator endpoints to change the + * We're emulating an application "foo" which is running with the "development" profile + * and is asking for its properties using the REST endpoint. We're also calling the + * /env & /refresh actuator endpoints to change the * `spring.cloud.config.server.overrides.foo` property. Since we see that we only get * the overridden "foo" property after the context refresh we are sure that the * properties have been set and the EnvironmentController bean has successfully been diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index c75102b7..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.5.RELEASE + 2.1.5.BUILD-SNAPSHOT spring-cloud-starter-config - 2.1.5.RELEASE + 2.1.5.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 69e742b594108ebe42ac8361c0c3352b9ce3c8e0 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 18 Nov 2019 14:46:15 +0000 Subject: [PATCH 6/7] Bumping versions to 2.1.6.BUILD-SNAPSHOT after release --- 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 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index f9314bb8..46f9c64e 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.6.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 5d30012f..495999b1 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.6.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.1.8.BUILD-SNAPSHOT + 2.1.10.BUILD-SNAPSHOT @@ -27,7 +27,7 @@ config - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT true true diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 98e8fec4..fd714df6 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.6.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 53f5608d..c334d6c9 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.8.BUILD-SNAPSHOT + 2.1.10.BUILD-SNAPSHOT spring-cloud-config-dependencies - 2.1.5.BUILD-SNAPSHOT + 2.1.6.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 495ca478..bac4ad99 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.6.BUILD-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 2.1.4.BUILD-SNAPSHOT + 2.1.5.BUILD-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 6eaf8414..e16c78a0 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.6.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 9b89c0af..77b821b1 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.6.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 166486b7..28fc9a5c 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.6.BUILD-SNAPSHOT spring-cloud-starter-config - 2.1.5.BUILD-SNAPSHOT + 2.1.6.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From e38f5e854d8872123492d979740da51df9f6d547 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Fri, 22 Nov 2019 09:59:58 -0500 Subject: [PATCH 7/7] Added comments about what the logic is doing --- .../HttpClientConfigurableHttpConnectionFactory.java | 5 +++++ 1 file changed, 5 insertions(+) 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 7aa975fe..6fd20268 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 @@ -105,6 +105,11 @@ public class HttpClientConfigurableHttpConnectionFactory return HttpClients.custom(); } if (builderMap.size() > 1) { + /* + * Try to determine if there is an exact match URL or not. So if there is a placeholder in the URL, filter + * it out. We should be left with only URLs which have no placeholders. + * That is the one we want to use in the case there are multiple matches. + */ List keys = builderMap.keySet().stream().filter(key -> { String[] tokens = key.split(PLACEHOLDER_PATTERN); return tokens.length == 1;