From 97421f0bf893d1675ac22da5793c2584b73d287d Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Wed, 30 Mar 2022 12:14:05 -0400 Subject: [PATCH 01/18] Use path to key property in SpringVaultEnvironmentRepository. Fixes #2072 (#2073) --- .../SpringVaultEnvironmentRepository.java | 8 ++++- ...SpringVaultEnvironmentRepositoryTests.java | 29 ++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepository.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepository.java index 6336a3ce..3e220fda 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepository.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepository.java @@ -25,6 +25,7 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.cloud.config.server.environment.AbstractVaultEnvironmentRepository; import org.springframework.cloud.config.server.environment.EnvironmentWatch; import org.springframework.cloud.config.server.environment.VaultEnvironmentProperties; +import org.springframework.util.StringUtils; import org.springframework.validation.annotation.Validated; import org.springframework.vault.core.VaultKeyValueOperations; import org.springframework.vault.support.VaultResponse; @@ -39,15 +40,20 @@ public class SpringVaultEnvironmentRepository extends AbstractVaultEnvironmentRe private final ObjectMapper objectMapper; + private String path = ""; + public SpringVaultEnvironmentRepository(ObjectProvider request, EnvironmentWatch watch, VaultEnvironmentProperties properties, VaultKeyValueOperations keyValueTemplate) { super(request, watch, properties); this.keyValueTemplate = keyValueTemplate; + if (properties.getKvVersion() == 2 && StringUtils.hasText(properties.getPathToKey())) { + path = "data/" + properties.getPathToKey() + "/"; + } this.objectMapper = new ObjectMapper(); } protected String read(String key) { - VaultResponse response = this.keyValueTemplate.get(key); + VaultResponse response = this.keyValueTemplate.get(this.path + key); if (response != null) { try { return objectMapper.writeValueAsString(response.getData()); diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepositoryTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepositoryTests.java index df0c3627..0a354cf3 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepositoryTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepositoryTests.java @@ -27,6 +27,7 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.server.environment.EnvironmentWatch; import org.springframework.cloud.config.server.environment.VaultEnvironmentProperties; +import org.springframework.util.StringUtils; import org.springframework.vault.core.VaultKeyValueOperations; import org.springframework.vault.support.VaultResponse; @@ -48,12 +49,32 @@ public class SpringVaultEnvironmentRepositoryTests { @Test public void testFindOneNoDefaultKey() { - VaultKeyValueOperations keyValueTemplate = mock(VaultKeyValueOperations.class); - when(keyValueTemplate.get("myapp")).thenReturn(withVaultResponse("foo", "bar")); - when(keyValueTemplate.get("application")).thenReturn(withVaultResponse("def-foo", "def-bar")); + defaultKeyTest("", 2); + } + @Test + public void testPathKey() { + defaultKeyTest("mypath", 2); + } + + @Test + public void testPathKeyNotUsedWithVersionOne() { + defaultKeyTest("mypath", 1); + } + + private void defaultKeyTest(String myPathKey, int version) { + String path = ""; + if (StringUtils.hasText(myPathKey) && version == 2) { + path = "data/" + myPathKey + "/"; + } + VaultKeyValueOperations keyValueTemplate = mock(VaultKeyValueOperations.class); + when(keyValueTemplate.get(path + "myapp")).thenReturn(withVaultResponse("foo", "bar")); + when(keyValueTemplate.get(path + "application")).thenReturn(withVaultResponse("def-foo", "def-bar")); + VaultEnvironmentProperties properties = new VaultEnvironmentProperties(); + properties.setPathToKey(myPathKey); + properties.setKvVersion(version); SpringVaultEnvironmentRepository repo = new SpringVaultEnvironmentRepository(mockHttpRequest(), - new EnvironmentWatch.Default(), new VaultEnvironmentProperties(), keyValueTemplate); + new EnvironmentWatch.Default(), properties, keyValueTemplate); Environment e = repo.findOne("myapp", null, null); assertThat(e.getName()).as("Name should be the same as the application argument").isEqualTo("myapp"); From 7acfb68078a2bd005cb75dc9f4965aa4ab914be2 Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Thu, 17 Mar 2022 17:30:39 +0100 Subject: [PATCH 02/18] Simplify encryption autoconfig (#2065) --- ...efaultTextEncryptionAutoConfiguration.java | 76 ++++++++++++++++++ .../config/EncryptionAutoConfiguration.java | 80 ++----------------- .../RsaEncryptionAutoConfiguration.java | 66 +++++++++++++++ .../encryption/EncryptionController.java | 18 ++++- .../main/resources/META-INF/spring.factories | 4 + ...BootstrapConfigServerIntegrationTests.java | 2 +- 6 files changed, 169 insertions(+), 77 deletions(-) create mode 100644 spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/DefaultTextEncryptionAutoConfiguration.java create mode 100644 spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/RsaEncryptionAutoConfiguration.java diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/DefaultTextEncryptionAutoConfiguration.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/DefaultTextEncryptionAutoConfiguration.java new file mode 100644 index 00000000..b6607a03 --- /dev/null +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/DefaultTextEncryptionAutoConfiguration.java @@ -0,0 +1,76 @@ +/* + * Copyright 2002-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.config.server.config; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.bootstrap.encrypt.KeyProperties; +import org.springframework.cloud.config.server.encryption.LocatorTextEncryptor; +import org.springframework.cloud.config.server.encryption.TextEncryptorLocator; +import org.springframework.cloud.context.encrypt.EncryptorFactory; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.crypto.encrypt.Encryptors; +import org.springframework.security.crypto.encrypt.TextEncryptor; +import org.springframework.util.StringUtils; + +/** + * Default text encryption auto-configuration. + * + * @author Olga Maciaszek-Sharma + * @since 3.1.2 + */ +@Configuration(proxyBeanMethods = false) +@AutoConfigureAfter(RsaEncryptionAutoConfiguration.class) +@EnableConfigurationProperties +public class DefaultTextEncryptionAutoConfiguration { + + private static final Log LOG = LogFactory.getLog(DefaultTextEncryptionAutoConfiguration.class); + + @Autowired + ApplicationContext context; + + @Bean + @ConditionalOnMissingBean + public KeyProperties keyProperties() { + return new KeyProperties(); + } + + @Bean + @ConditionalOnMissingBean(TextEncryptor.class) + @ConditionalOnBean(TextEncryptorLocator.class) + public TextEncryptor defaultLocatorBasedTextEncryptor(TextEncryptorLocator locator) { + return new LocatorTextEncryptor(locator); + } + + @Bean + @ConditionalOnMissingBean(TextEncryptor.class) + public TextEncryptor defaultTextEncryptor(KeyProperties key) { + if (StringUtils.hasText(key.getKey())) { + return new EncryptorFactory(key.getSalt()).create(key.getKey()); + } + return Encryptors.noOpText(); + } + +} diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/EncryptionAutoConfiguration.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/EncryptionAutoConfiguration.java index f3f73e61..abb59e17 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/EncryptionAutoConfiguration.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/EncryptionAutoConfiguration.java @@ -17,33 +17,20 @@ package org.springframework.cloud.config.server.config; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.cloud.bootstrap.encrypt.KeyProperties; -import org.springframework.cloud.bootstrap.encrypt.KeyProperties.KeyStore; -import org.springframework.cloud.bootstrap.encrypt.RsaProperties; import org.springframework.cloud.config.server.encryption.CipherEnvironmentEncryptor; import org.springframework.cloud.config.server.encryption.EnvironmentEncryptor; -import org.springframework.cloud.config.server.encryption.KeyStoreTextEncryptorLocator; -import org.springframework.cloud.config.server.encryption.LocatorTextEncryptor; import org.springframework.cloud.config.server.encryption.SingleTextEncryptorLocator; import org.springframework.cloud.config.server.encryption.TextEncryptorLocator; -import org.springframework.cloud.context.encrypt.EncryptorFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; -import org.springframework.security.crypto.encrypt.Encryptors; import org.springframework.security.crypto.encrypt.TextEncryptor; -import org.springframework.security.rsa.crypto.KeyStoreKeyFactory; -import org.springframework.security.rsa.crypto.RsaAlgorithm; -import org.springframework.security.rsa.crypto.RsaSecretEncryptor; -import org.springframework.util.StringUtils; /** - * Auto configuration for text encryptors and environment encryptors (non-web stuff). + * Auto-configuration for text encryptors and environment encryptors (non-web stuff). * Users can provide beans of the same type as any or all of the beans defined here in * application code to override the default behaviour. * @@ -54,14 +41,14 @@ import org.springframework.util.StringUtils; * */ @Configuration(proxyBeanMethods = false) -@EnableConfigurationProperties -@Import(SingleTextEncryptorConfiguration.class) +@AutoConfigureAfter(DefaultTextEncryptionAutoConfiguration.class) public class EncryptionAutoConfiguration { @Bean - @ConditionalOnMissingBean - public KeyProperties keyProperties() { - return new KeyProperties(); + @ConditionalOnBean(TextEncryptor.class) + @ConditionalOnMissingBean(TextEncryptorLocator.class) + public SingleTextEncryptorLocator singleTextEncryptorLocator(TextEncryptor encryptor) { + return new SingleTextEncryptorLocator(encryptor); } @Bean @@ -76,57 +63,4 @@ public class EncryptionAutoConfiguration { return new CipherEnvironmentEncryptor(locator); } - @Bean - @ConditionalOnMissingBean(TextEncryptor.class) - public TextEncryptor defaultTextEncryptor(@Autowired(required = false) TextEncryptorLocator locator, - KeyProperties key) { - if (locator != null) { - return new LocatorTextEncryptor(locator); - } - if (StringUtils.hasText(key.getKey())) { - return new EncryptorFactory(key.getSalt()).create(key.getKey()); - } - return Encryptors.noOpText(); - } - - @Configuration(proxyBeanMethods = false) - @ConditionalOnClass(RsaSecretEncryptor.class) - @ConditionalOnProperty(prefix = "encrypt.key-store", value = "location", matchIfMissing = false) - protected static class KeyStoreConfiguration { - - @Autowired - private KeyProperties key; - - @Autowired - private RsaProperties rsaProperties; - - @Bean - @ConditionalOnMissingBean - public TextEncryptorLocator textEncryptorLocator() { - KeyStore keyStore = key.getKeyStore(); - KeyStoreTextEncryptorLocator locator = new KeyStoreTextEncryptorLocator( - new KeyStoreKeyFactory(keyStore.getLocation(), keyStore.getPassword().toCharArray(), - key.getKeyStore().getType()), - keyStore.getSecret(), keyStore.getAlias()); - RsaAlgorithm algorithm = this.rsaProperties.getAlgorithm(); - locator.setRsaAlgorithm(algorithm); - locator.setSalt(this.rsaProperties.getSalt()); - locator.setStrong(this.rsaProperties.isStrong()); - return locator; - } - - } - -} - -@ConditionalOnBean(TextEncryptor.class) -@ConditionalOnMissingBean(TextEncryptorLocator.class) -@Configuration(proxyBeanMethods = false) -class SingleTextEncryptorConfiguration { - - @Bean - public SingleTextEncryptorLocator textEncryptorLocator(TextEncryptor encryptor) { - return new SingleTextEncryptorLocator(encryptor); - } - } diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/RsaEncryptionAutoConfiguration.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/RsaEncryptionAutoConfiguration.java new file mode 100644 index 00000000..13a5f80e --- /dev/null +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/RsaEncryptionAutoConfiguration.java @@ -0,0 +1,66 @@ +/* + * Copyright 2002-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.config.server.config; + +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.bootstrap.encrypt.KeyProperties; +import org.springframework.cloud.bootstrap.encrypt.RsaProperties; +import org.springframework.cloud.config.server.encryption.KeyStoreTextEncryptorLocator; +import org.springframework.cloud.config.server.encryption.TextEncryptorLocator; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.rsa.crypto.KeyStoreKeyFactory; +import org.springframework.security.rsa.crypto.RsaAlgorithm; +import org.springframework.security.rsa.crypto.RsaSecretEncryptor; + +/** + * Auto-configuration for RSA encryption. + * + * @author Olga Maciaszek-Sharma + * @since 3.1.2 + */ +@Configuration(proxyBeanMethods = false) +@ConditionalOnProperty(prefix = "encrypt.key-store", value = "location") +@ConditionalOnClass(RsaSecretEncryptor.class) +@EnableConfigurationProperties +public class RsaEncryptionAutoConfiguration { + + @Bean + @ConditionalOnMissingBean + public KeyProperties keyProperties() { + return new KeyProperties(); + } + + @Bean + @ConditionalOnMissingBean + public TextEncryptorLocator textEncryptorLocator(KeyProperties key, RsaProperties rsaProperties) { + KeyProperties.KeyStore keyStore = key.getKeyStore(); + KeyStoreTextEncryptorLocator locator = new KeyStoreTextEncryptorLocator( + new KeyStoreKeyFactory(keyStore.getLocation(), keyStore.getPassword().toCharArray(), + key.getKeyStore().getType()), + keyStore.getSecret(), keyStore.getAlias()); + RsaAlgorithm algorithm = rsaProperties.getAlgorithm(); + locator.setRsaAlgorithm(algorithm); + locator.setSalt(rsaProperties.getSalt()); + locator.setStrong(rsaProperties.isStrong()); + return locator; + } + +} diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/encryption/EncryptionController.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/encryption/EncryptionController.java index 6497d98b..257ac316 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/encryption/EncryptionController.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/encryption/EncryptionController.java @@ -109,7 +109,9 @@ public class EncryptionController { Map keys = helper.getEncryptorKeys(name, profiles, input); String textToEncrypt = helper.stripPrefix(input); String encrypted = helper.addPrefix(keys, encryptorLocator.locate(keys).encrypt(textToEncrypt)); - logger.info("Encrypted data"); + if (logger.isInfoEnabled()) { + logger.info("Encrypted data"); + } return encrypted; } @@ -128,21 +130,31 @@ public class EncryptionController { encryptor = getEncryptor(name, profiles, data); String input = stripFormData(helper.stripPrefix(data), type, true); String decrypted = encryptor.decrypt(input); - logger.info("Decrypted cipher data"); + if (logger.isInfoEnabled()) { + logger.info("Decrypted cipher data"); + } return decrypted; } catch (IllegalArgumentException | IllegalStateException e) { - logger.error("Cannot decrypt key:" + name + ", value:" + data, e); + if (logger.isErrorEnabled()) { + logger.error("Cannot decrypt key:" + name + ", value:" + data, e); + } throw new InvalidCipherException(); } } private TextEncryptor getEncryptor(String name, String profiles, String data) { if (encryptorLocator == null) { + if (logger.isDebugEnabled()) { + logger.debug("Text encryptorLocator is null."); + } throw new KeyNotInstalledException(); } TextEncryptor encryptor = encryptorLocator.locate(helper.getEncryptorKeys(name, profiles, data)); if (encryptor == null) { + if (logger.isDebugEnabled()) { + logger.debug("TextEncryptor is null."); + } throw new KeyNotInstalledException(); } return encryptor; diff --git a/spring-cloud-config-server/src/main/resources/META-INF/spring.factories b/spring-cloud-config-server/src/main/resources/META-INF/spring.factories index 31eb4d95..ed95385a 100644 --- a/spring-cloud-config-server/src/main/resources/META-INF/spring.factories +++ b/spring-cloud-config-server/src/main/resources/META-INF/spring.factories @@ -1,6 +1,8 @@ # Bootstrap components org.springframework.cloud.bootstrap.BootstrapConfiguration=\ org.springframework.cloud.config.server.bootstrap.ConfigServerBootstrapConfiguration,\ +org.springframework.cloud.config.server.config.DefaultTextEncryptionAutoConfiguration,\ +org.springframework.cloud.config.server.config.RsaEncryptionAutoConfiguration,\ org.springframework.cloud.config.server.config.EncryptionAutoConfiguration # Environment PostProcessor @@ -11,6 +13,8 @@ org.springframework.cloud.config.server.bootstrap.ConfigServerBootstrapApplicati org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.cloud.config.server.config.ConfigServerAutoConfiguration,\ org.springframework.cloud.config.server.config.EncryptionAutoConfiguration,\ +org.springframework.cloud.config.server.config.DefaultTextEncryptionAutoConfiguration,\ +org.springframework.cloud.config.server.config.RsaEncryptionAutoConfiguration,\ org.springframework.cloud.config.server.config.VaultEncryptionAutoConfiguration org.springframework.boot.diagnostics.FailureAnalyzer=\ org.springframework.cloud.config.server.diagnostics.GitUriFailureAnalyzer diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java index d8a0e681..9cb7d4b1 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java @@ -76,7 +76,7 @@ public class BootstrapConfigServerIntegrationTests { @Test @Ignore // FIXME: configdata - public void environmentBootstraps() throws Exception { + public void environmentBootstraps() { assertThat(this.env.getProperty("info.foo", "")).isEqualTo("bar"); assertThat(this.env.getProperty("config.foo", "")).isEqualTo("foo"); } From cd084738849b0ac6c0d48055c90ad58919aaf0f8 Mon Sep 17 00:00:00 2001 From: Benjamin Einaudi Date: Tue, 22 Feb 2022 21:42:10 +0100 Subject: [PATCH 03/18] [spring-cloud-config] Allow to use other scheme proxy when only one proxy is configured (#2049) Allow to specify 'http' proxy for both protocols and viceversa Close #2048 --- .../main/asciidoc/spring-cloud-config.adoc | 6 +- .../server/proxy/SchemeBasedRoutePlanner.java | 18 ++-- ...ttpClientVaultRestTemplateFactoryTest.java | 13 +-- ...HttpConnectionFactoryIntegrationTests.java | 12 +-- .../proxy/SchemeBasedRoutePlannerTest.java | 99 +++++++++++++++++++ 5 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java diff --git a/docs/src/main/asciidoc/spring-cloud-config.adoc b/docs/src/main/asciidoc/spring-cloud-config.adoc index f38271f3..3467b400 100644 --- a/docs/src/main/asciidoc/spring-cloud-config.adoc +++ b/docs/src/main/asciidoc/spring-cloud-config.adoc @@ -740,7 +740,11 @@ When `myApp` has the `dev` profile enabled, properties written to all of the abo ==== Accessing Backends Through a Proxy -The configuration server can access a Git or Vault backend through an HTTP or HTTPS proxy. This behavior is controlled for either Git or Vault by settings under `proxy.http` and `proxy.https`. These settings are per repository, so if you are using a <> you must configure proxy settings for each backend in the composite individually. If using a network which requires separate proxy servers for HTTP and HTTPS URLs, you can configure both the HTTP and the HTTPS proxy settings for a single backend. +The configuration server can access a Git or Vault backend through an HTTP or HTTPS proxy. +This behavior is controlled for either Git or Vault by settings under `proxy.http` and `proxy.https`. +These settings are per repository, so if you are using a <> you must configure proxy settings for each backend in the composite individually. +If using a network which requires separate proxy servers for HTTP and HTTPS URLs, you can configure both the HTTP and the HTTPS proxy settings for a single backend: in this case `http` access will use `http` proxy and `https` access the `https` one. +Also, you may specify one sole proxy that will be used for both protocols using the proxy definition protocol between application and proxy. The following table describes the proxy configuration properties for both HTTP and HTTPS proxies. All of these properties must be prefixed by `proxy.http` or `proxy.https`. diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlanner.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlanner.java index 008055e2..77fa0bc8 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlanner.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlanner.java @@ -26,23 +26,27 @@ import org.apache.http.protocol.HttpContext; */ public class SchemeBasedRoutePlanner extends DefaultRoutePlanner { - private final ProxyHostProperties httpsProxy; + private final HttpHost httpsProxy; - private final ProxyHostProperties httpProxy; + private final HttpHost defaultSchemeProxy; public SchemeBasedRoutePlanner(ProxyHostProperties httpsProxy, ProxyHostProperties httpProxy) { super(null); - this.httpsProxy = httpsProxy; - this.httpProxy = httpProxy; + this.httpsProxy = buildProxy(httpsProxy, "https"); + this.defaultSchemeProxy = buildProxy(httpProxy, HttpHost.DEFAULT_SCHEME_NAME); } @Override protected HttpHost determineProxy(HttpHost target, HttpRequest request, HttpContext context) { - return "https".equals(target.getSchemeName()) ? determineProxy(this.httpsProxy, "https") - : determineProxy(this.httpProxy, HttpHost.DEFAULT_SCHEME_NAME); + return "https".equals(target.getSchemeName()) ? determineProxy(this.httpsProxy, this.defaultSchemeProxy) + : determineProxy(this.defaultSchemeProxy, this.httpsProxy); } - private HttpHost determineProxy(ProxyHostProperties properties, String scheme) { + private HttpHost determineProxy(HttpHost proxy, HttpHost fallbackProxy) { + return proxy != null ? proxy : fallbackProxy; + } + + private HttpHost buildProxy(ProxyHostProperties properties, String scheme) { if (properties == null) { return null; } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java index 1e101040..f4da00d5 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java @@ -103,15 +103,16 @@ public class HttpClientVaultRestTemplateFactoryTest { } @Test - public void httpsProxy_notCalled() throws Exception { + public void httpsProxy_called_for_http_request_when_no_httpProxy_specified() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(null, HTTPS_PROXY); RestTemplate restTemplate = this.factory.build(properties); - this.expectedException.expectCause( - allOf(instanceOf(UnknownHostException.class), hasProperty("message", containsString("somehost")))); + this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); restTemplate.getForObject("http://somehost", String.class); } + @Test public void authenticatedHttpProxy() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(AUTHENTICATED_HTTP_PROXY, null); @@ -133,11 +134,11 @@ public class HttpClientVaultRestTemplateFactoryTest { } @Test - public void httpProxy_notCalled() throws Exception { + public void httpProxy_called_for_https_request_when_no_httpsProxy_specified() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(HTTP_PROXY, null); RestTemplate restTemplate = this.factory.build(properties); - this.expectedException.expectCause( - allOf(instanceOf(UnknownHostException.class), hasProperty("message", containsString("somehost")))); + this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), + hasProperty("message", containsString(HTTP_PROXY.getHost())))); restTemplate.getForObject("https://somehost", String.class); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java index 68a2ac1e..60af4288 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java @@ -135,13 +135,13 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { } @Test - public void httpsProxy_notCalled() throws Exception { + public void httpsProxy_called_for_http_request_when_no_httpProxy_specified() throws Exception { String repoUrl = "https://myrepo/repo.git"; new SpringApplicationBuilder(TestConfiguration.class).web(WebApplicationType.NONE) .properties(gitProperties(repoUrl, null, HTTPS_PROXY)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); - this.expectedException.expectCause( - allOf(instanceOf(UnknownHostException.class), hasProperty("message", containsString("somehost")))); + this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); makeRequest(httpClient, "http://somehost"); } @@ -182,13 +182,13 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { } @Test - public void httpProxy_notCalled() throws Exception { + public void httpProxy_called_for_https_request_when_no_httpsProxy_specified() throws Exception { String repoUrl = "https://myrepo/repo.git"; new SpringApplicationBuilder(TestConfiguration.class).web(WebApplicationType.NONE) .properties(gitProperties(repoUrl, HTTP_PROXY, null)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); - this.expectedException.expectCause( - allOf(instanceOf(UnknownHostException.class), hasProperty("message", containsString("somehost")))); + this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), + hasProperty("message", containsString(HTTP_PROXY.getHost())))); makeRequest(httpClient, "https://somehost"); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java new file mode 100644 index 00000000..0ac241b5 --- /dev/null +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.config.server.proxy; + +import org.apache.http.HttpHost; +import org.apache.http.HttpRequest; +import org.apache.http.protocol.HttpContext; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +class SchemeBasedRoutePlannerTest { + + private static final ProxyHostProperties SECURED_PROXY_PROPERTIES = buildProxyProperties("http.host", 8080); + + private static final ProxyHostProperties UNSECURED_PROXY_PROPERTIES = buildProxyProperties("https.host", 8443); + + @Test + void determineProxy_should_return_https_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + + final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); + + assertThat(result.getSchemeName()).isEqualTo("https"); + assertThat(result.getHostName()).isEqualTo(SECURED_PROXY_PROPERTIES.getHost()); + assertThat(result.getPort()).isEqualTo(SECURED_PROXY_PROPERTIES.getPort()); + } + + @Test + void determineProxy_should_return_https_proxy_when_target_scheme_name_is_http_and_no_http_proxy_specified() { + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, null); + + final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); + + assertThat(result.getSchemeName()).isEqualTo("https"); + assertThat(result.getHostName()).isEqualTo(SECURED_PROXY_PROPERTIES.getHost()); + assertThat(result.getPort()).isEqualTo(SECURED_PROXY_PROPERTIES.getPort()); + } + + @Test + void determineProxy_should_return_http_proxy_when_target_scheme_name_is_http_and_http_proxy_provided() { + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + + final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); + + assertThat(result.getSchemeName()).isEqualTo("http"); + assertThat(result.getHostName()).isEqualTo(UNSECURED_PROXY_PROPERTIES.getHost()); + assertThat(result.getPort()).isEqualTo(UNSECURED_PROXY_PROPERTIES.getPort()); + } + + @Test + void determineProxy_should_return_http_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(null, UNSECURED_PROXY_PROPERTIES); + + final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); + + assertThat(result.getSchemeName()).isEqualTo("http"); + assertThat(result.getHostName()).isEqualTo(UNSECURED_PROXY_PROPERTIES.getHost()); + assertThat(result.getPort()).isEqualTo(UNSECURED_PROXY_PROPERTIES.getPort()); + } + + private HttpHost target(String scheme) { + HttpHost host = mock(HttpHost.class); + when(host.getSchemeName()).thenReturn(scheme); + return host; + } + + private HttpRequest anyRequest() { + return mock(HttpRequest.class); + } + + private HttpContext anyContext() { + return mock(HttpContext.class); + } + + private static ProxyHostProperties buildProxyProperties(String host, int port) { + ProxyHostProperties properties = new ProxyHostProperties(); + properties.setHost(host); + properties.setPort(port); + return properties; + } + +} From ca61a5b9b63ef335e72b78aff3e9a293bac31e0c Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 8 Apr 2022 00:29:32 +0000 Subject: [PATCH 04/18] Bumping versions --- .../config/HttpClientVaultRestTemplateFactoryTest.java | 5 ++--- .../ConfigurableHttpConnectionFactoryIntegrationTests.java | 4 ++-- .../config/server/proxy/SchemeBasedRoutePlannerTest.java | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java index f4da00d5..fd2308a2 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java @@ -107,12 +107,11 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(null, HTTPS_PROXY); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); restTemplate.getForObject("http://somehost", String.class); } - @Test public void authenticatedHttpProxy() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(AUTHENTICATED_HTTP_PROXY, null); @@ -138,7 +137,7 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(HTTP_PROXY, null); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); restTemplate.getForObject("https://somehost", String.class); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java index 60af4288..afaff3fb 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java @@ -141,7 +141,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, null, HTTPS_PROXY)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); makeRequest(httpClient, "http://somehost"); } @@ -188,7 +188,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, HTTP_PROXY, null)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); makeRequest(httpClient, "https://somehost"); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java index 0ac241b5..12512709 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java @@ -33,7 +33,8 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_https_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, + UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); @@ -55,7 +56,8 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_http_proxy_when_target_scheme_name_is_http_and_http_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, + UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); From 6535ef2f5860d6bc331f9e5301ffffd299686311 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Tue, 26 Apr 2022 15:50:33 +0000 Subject: [PATCH 05/18] Update SNAPSHOT to 3.1.2 --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 704dba11..814098d6 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/pom.xml b/pom.xml index 12441257..fc266850 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2-SNAPSHOT + 3.1.2 @@ -27,7 +27,7 @@ config - 3.1.2-SNAPSHOT + 3.1.2 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 8a2bb080..9ca5efff 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 8d1b5caf..edd75908 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 6b8ece73..094590ba 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 - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-config-dependencies - 3.1.2-SNAPSHOT + 3.1.2 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 e2d16989..3c75bbe8 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 - 3.1.2-SNAPSHOT + 3.1.2 .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.1-SNAPSHOT + 3.1.0 diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index b1efc9f8..6658a338 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index f1f6d345..946a2456 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a46cf7dd..1d96a3da 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 - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-starter-config - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 69b07470821c74f624dcd5909d25e799ec5b7042 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Tue, 26 Apr 2022 15:53:30 +0000 Subject: [PATCH 06/18] Going back to snapshots --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 814098d6..704dba11 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index fc266850..12441257 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2 + 3.1.2-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.2 + 3.1.2-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 9ca5efff..8a2bb080 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index edd75908..8d1b5caf 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 094590ba..6b8ece73 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 - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-config-dependencies - 3.1.2 + 3.1.2-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 3c75bbe8..e2d16989 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 - 3.1.2 + 3.1.2-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.0 + 3.1.1-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 6658a338..b1efc9f8 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 946a2456..f1f6d345 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 1d96a3da..a46cf7dd 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 - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-starter-config - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 3528115046584b1136e8b1d8d7744cd89e6e82b6 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Tue, 26 Apr 2022 15:53:30 +0000 Subject: [PATCH 07/18] Bumping versions to 3.1.3-SNAPSHOT after release --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 704dba11..d385b484 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 12441257..cd6ffc5d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 8a2bb080..ae8d4fc7 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 8d1b5caf..fa49b755 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 6b8ece73..071a0954 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-config-dependencies - 3.1.2-SNAPSHOT + 3.1.3-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 e2d16989..02ee789e 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.1-SNAPSHOT + 3.1.0 diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index b1efc9f8..5ae28cf5 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index f1f6d345..63cce804 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a46cf7dd..3f75181f 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-starter-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 0cc9713fc3fafa229197f0fccb15b9dfa76c96cd Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 27 Apr 2022 00:29:44 +0000 Subject: [PATCH 08/18] Bumping versions --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index d385b484..704dba11 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index cd6ffc5d..12441257 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index ae8d4fc7..8a2bb080 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index fa49b755..8d1b5caf 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 071a0954..6b8ece73 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT spring-cloud-config-dependencies - 3.1.3-SNAPSHOT + 3.1.2-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 02ee789e..e2d16989 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.0 + 3.1.1-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 5ae28cf5..b1efc9f8 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 63cce804..f1f6d345 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 3f75181f..a46cf7dd 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT spring-cloud-starter-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From e663618080eee20fa53ff7ef49724f8c5ed19401 Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Wed, 27 Apr 2022 11:06:02 +0200 Subject: [PATCH 09/18] Revert "Bumping versions" This reverts commit 0cc9713fc3fafa229197f0fccb15b9dfa76c96cd. --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 704dba11..d385b484 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 12441257..cd6ffc5d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 8a2bb080..ae8d4fc7 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 8d1b5caf..fa49b755 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 6b8ece73..071a0954 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-config-dependencies - 3.1.2-SNAPSHOT + 3.1.3-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 e2d16989..02ee789e 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.1-SNAPSHOT + 3.1.0 diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index b1efc9f8..5ae28cf5 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index f1f6d345..63cce804 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a46cf7dd..3f75181f 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-starter-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From df7dea96a15051a1df0e54df668624fd86ecd141 Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Wed, 27 Apr 2022 11:06:05 +0200 Subject: [PATCH 10/18] Revert "Bumping versions to 3.1.3-SNAPSHOT after release" This reverts commit 3528115046584b1136e8b1d8d7744cd89e6e82b6. --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index d385b484..704dba11 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index cd6ffc5d..12441257 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index ae8d4fc7..8a2bb080 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index fa49b755..8d1b5caf 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 071a0954..6b8ece73 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT spring-cloud-config-dependencies - 3.1.3-SNAPSHOT + 3.1.2-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 02ee789e..e2d16989 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.0 + 3.1.1-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 5ae28cf5..b1efc9f8 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 63cce804..f1f6d345 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 3f75181f..a46cf7dd 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 - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT spring-cloud-starter-config - 3.1.3-SNAPSHOT + 3.1.2-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 287d0c80b59180c8eb1984eeff80758fa008a71b Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Wed, 27 Apr 2022 11:06:09 +0200 Subject: [PATCH 11/18] Revert "Going back to snapshots" This reverts commit 69b07470821c74f624dcd5909d25e799ec5b7042. --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 704dba11..814098d6 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/pom.xml b/pom.xml index 12441257..fc266850 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2-SNAPSHOT + 3.1.2 @@ -27,7 +27,7 @@ config - 3.1.2-SNAPSHOT + 3.1.2 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 8a2bb080..9ca5efff 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 8d1b5caf..edd75908 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 6b8ece73..094590ba 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 - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-config-dependencies - 3.1.2-SNAPSHOT + 3.1.2 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 e2d16989..3c75bbe8 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 - 3.1.2-SNAPSHOT + 3.1.2 .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.1-SNAPSHOT + 3.1.0 diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index b1efc9f8..6658a338 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index f1f6d345..946a2456 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a46cf7dd..1d96a3da 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 - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-starter-config - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From d9c8452fe7fd78b8d300474cf49f8ebff0acbe92 Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Wed, 27 Apr 2022 11:06:13 +0200 Subject: [PATCH 12/18] Revert "Update SNAPSHOT to 3.1.2" This reverts commit 6535ef2f5860d6bc331f9e5301ffffd299686311. --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 814098d6..704dba11 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index fc266850..12441257 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2 + 3.1.2-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.2 + 3.1.2-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 9ca5efff..8a2bb080 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index edd75908..8d1b5caf 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 094590ba..6b8ece73 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 - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-config-dependencies - 3.1.2 + 3.1.2-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 3c75bbe8..e2d16989 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 - 3.1.2 + 3.1.2-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.0 + 3.1.1-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 6658a338..b1efc9f8 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 946a2456..f1f6d345 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 1d96a3da..a46cf7dd 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 - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-starter-config - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 989c17c911d2ef7c1f89b90930afc0e7f51eaa5f Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Wed, 27 Apr 2022 11:06:17 +0200 Subject: [PATCH 13/18] Revert "Bumping versions" This reverts commit ca61a5b9b63ef335e72b78aff3e9a293bac31e0c. --- .../config/HttpClientVaultRestTemplateFactoryTest.java | 5 +++-- .../ConfigurableHttpConnectionFactoryIntegrationTests.java | 4 ++-- .../config/server/proxy/SchemeBasedRoutePlannerTest.java | 6 ++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java index fd2308a2..f4da00d5 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java @@ -107,11 +107,12 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(null, HTTPS_PROXY); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); restTemplate.getForObject("http://somehost", String.class); } + @Test public void authenticatedHttpProxy() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(AUTHENTICATED_HTTP_PROXY, null); @@ -137,7 +138,7 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(HTTP_PROXY, null); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); restTemplate.getForObject("https://somehost", String.class); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java index afaff3fb..60af4288 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java @@ -141,7 +141,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, null, HTTPS_PROXY)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); makeRequest(httpClient, "http://somehost"); } @@ -188,7 +188,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, HTTP_PROXY, null)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); makeRequest(httpClient, "https://somehost"); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java index 12512709..0ac241b5 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java @@ -33,8 +33,7 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_https_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, - UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); @@ -56,8 +55,7 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_http_proxy_when_target_scheme_name_is_http_and_http_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, - UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); From 48be8bc3c5361d4946eb677d9efb286b6df519c2 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 27 Apr 2022 10:40:46 +0000 Subject: [PATCH 14/18] Update SNAPSHOT to 3.1.2 --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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 +- .../config/HttpClientVaultRestTemplateFactoryTest.java | 5 ++--- .../ConfigurableHttpConnectionFactoryIntegrationTests.java | 4 ++-- .../config/server/proxy/SchemeBasedRoutePlannerTest.java | 6 ++++-- spring-cloud-starter-config/pom.xml | 4 ++-- 12 files changed, 22 insertions(+), 21 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 704dba11..814098d6 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/pom.xml b/pom.xml index 12441257..fc266850 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2-SNAPSHOT + 3.1.2 @@ -27,7 +27,7 @@ config - 3.1.2-SNAPSHOT + 3.1.2 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 8a2bb080..9ca5efff 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 8d1b5caf..edd75908 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 6b8ece73..094590ba 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 - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-config-dependencies - 3.1.2-SNAPSHOT + 3.1.2 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 e2d16989..3c75bbe8 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 - 3.1.2-SNAPSHOT + 3.1.2 .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.1-SNAPSHOT + 3.1.0 diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index b1efc9f8..6658a338 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index f1f6d345..946a2456 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 - 3.1.2-SNAPSHOT + 3.1.2 .. diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java index f4da00d5..fd2308a2 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java @@ -107,12 +107,11 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(null, HTTPS_PROXY); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); restTemplate.getForObject("http://somehost", String.class); } - @Test public void authenticatedHttpProxy() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(AUTHENTICATED_HTTP_PROXY, null); @@ -138,7 +137,7 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(HTTP_PROXY, null); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); restTemplate.getForObject("https://somehost", String.class); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java index 60af4288..afaff3fb 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java @@ -141,7 +141,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, null, HTTPS_PROXY)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); makeRequest(httpClient, "http://somehost"); } @@ -188,7 +188,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, HTTP_PROXY, null)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); makeRequest(httpClient, "https://somehost"); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java index 0ac241b5..12512709 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java @@ -33,7 +33,8 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_https_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, + UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); @@ -55,7 +56,8 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_http_proxy_when_target_scheme_name_is_http_and_http_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, + UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a46cf7dd..1d96a3da 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 - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-starter-config - 3.1.2-SNAPSHOT + 3.1.2 spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From fd6ca6c6687294b6c311e08c2aaa1eb1a6e65daf Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 27 Apr 2022 10:43:51 +0000 Subject: [PATCH 15/18] Going back to snapshots --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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 +- .../config/HttpClientVaultRestTemplateFactoryTest.java | 5 +++-- .../ConfigurableHttpConnectionFactoryIntegrationTests.java | 4 ++-- .../config/server/proxy/SchemeBasedRoutePlannerTest.java | 6 ++---- spring-cloud-starter-config/pom.xml | 4 ++-- 12 files changed, 21 insertions(+), 22 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 814098d6..704dba11 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index fc266850..12441257 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2 + 3.1.2-SNAPSHOT @@ -27,7 +27,7 @@ config - 3.1.2 + 3.1.2-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 9ca5efff..8a2bb080 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index edd75908..8d1b5caf 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 094590ba..6b8ece73 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 - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-config-dependencies - 3.1.2 + 3.1.2-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 3c75bbe8..e2d16989 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 - 3.1.2 + 3.1.2-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.0 + 3.1.1-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 6658a338..b1efc9f8 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 946a2456..f1f6d345 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 - 3.1.2 + 3.1.2-SNAPSHOT .. diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java index fd2308a2..f4da00d5 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java @@ -107,11 +107,12 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(null, HTTPS_PROXY); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); restTemplate.getForObject("http://somehost", String.class); } + @Test public void authenticatedHttpProxy() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(AUTHENTICATED_HTTP_PROXY, null); @@ -137,7 +138,7 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(HTTP_PROXY, null); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); restTemplate.getForObject("https://somehost", String.class); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java index afaff3fb..60af4288 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java @@ -141,7 +141,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, null, HTTPS_PROXY)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); makeRequest(httpClient, "http://somehost"); } @@ -188,7 +188,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, HTTP_PROXY, null)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); makeRequest(httpClient, "https://somehost"); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java index 12512709..0ac241b5 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java @@ -33,8 +33,7 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_https_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, - UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); @@ -56,8 +55,7 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_http_proxy_when_target_scheme_name_is_http_and_http_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, - UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 1d96a3da..a46cf7dd 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 - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-starter-config - 3.1.2 + 3.1.2-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 9d319c26ac99543d93b7535d8bbec34cb5115113 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 27 Apr 2022 10:43:51 +0000 Subject: [PATCH 16/18] Bumping versions to 3.1.3-SNAPSHOT after release --- docs/pom.xml | 2 +- pom.xml | 6 +++--- spring-cloud-config-client-tls-tests/pom.xml | 2 +- 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/docs/pom.xml b/docs/pom.xml index 704dba11..d385b484 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 12441257..10bf2cda 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2-SNAPSHOT + 3.1.2 @@ -27,7 +27,7 @@ config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT 1.11.911 v1-rev20201112-1.30.10 1.16.2 diff --git a/spring-cloud-config-client-tls-tests/pom.xml b/spring-cloud-config-client-tls-tests/pom.xml index 8a2bb080..ae8d4fc7 100644 --- a/spring-cloud-config-client-tls-tests/pom.xml +++ b/spring-cloud-config-client-tls-tests/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 8d1b5caf..fa49b755 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 6b8ece73..071a0954 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-config-dependencies - 3.1.2-SNAPSHOT + 3.1.3-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 e2d16989..02ee789e 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. spring-cloud-config-monitor @@ -14,7 +14,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 3.1.1-SNAPSHOT + 3.1.0 diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index b1efc9f8..5ae28cf5 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index f1f6d345..63cce804 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index a46cf7dd..3f75181f 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 - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-starter-config - 3.1.2-SNAPSHOT + 3.1.3-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 106a5e5b03d4b9c4e71952c274f93ae4152c0c28 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 28 Apr 2022 00:29:21 +0000 Subject: [PATCH 17/18] Bumping versions --- pom.xml | 2 +- .../config/HttpClientVaultRestTemplateFactoryTest.java | 5 ++--- .../ConfigurableHttpConnectionFactoryIntegrationTests.java | 4 ++-- .../config/server/proxy/SchemeBasedRoutePlannerTest.java | 6 ++++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 10bf2cda..cd6ffc5d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.2 + 3.1.3-SNAPSHOT diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java index f4da00d5..fd2308a2 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/config/HttpClientVaultRestTemplateFactoryTest.java @@ -107,12 +107,11 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(null, HTTPS_PROXY); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); restTemplate.getForObject("http://somehost", String.class); } - @Test public void authenticatedHttpProxy() throws Exception { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(AUTHENTICATED_HTTP_PROXY, null); @@ -138,7 +137,7 @@ public class HttpClientVaultRestTemplateFactoryTest { VaultEnvironmentProperties properties = getVaultEnvironmentProperties(HTTP_PROXY, null); RestTemplate restTemplate = this.factory.build(properties); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); restTemplate.getForObject("https://somehost", String.class); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java index 60af4288..afaff3fb 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/ConfigurableHttpConnectionFactoryIntegrationTests.java @@ -141,7 +141,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, null, HTTPS_PROXY)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTPS_PROXY.getHost())))); + hasProperty("message", containsString(HTTPS_PROXY.getHost())))); makeRequest(httpClient, "http://somehost"); } @@ -188,7 +188,7 @@ public class ConfigurableHttpConnectionFactoryIntegrationTests { .properties(gitProperties(repoUrl, HTTP_PROXY, null)).run(); HttpClient httpClient = getHttpClientForUrl(repoUrl); this.expectedException.expectCause(allOf(instanceOf(UnknownHostException.class), - hasProperty("message", containsString(HTTP_PROXY.getHost())))); + hasProperty("message", containsString(HTTP_PROXY.getHost())))); makeRequest(httpClient, "https://somehost"); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java index 0ac241b5..12512709 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/proxy/SchemeBasedRoutePlannerTest.java @@ -33,7 +33,8 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_https_proxy_when_target_scheme_name_is_https_and_https_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, + UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("https"), anyRequest(), anyContext()); @@ -55,7 +56,8 @@ class SchemeBasedRoutePlannerTest { @Test void determineProxy_should_return_http_proxy_when_target_scheme_name_is_http_and_http_proxy_provided() { - SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, UNSECURED_PROXY_PROPERTIES); + SchemeBasedRoutePlanner planner = new SchemeBasedRoutePlanner(SECURED_PROXY_PROPERTIES, + UNSECURED_PROXY_PROPERTIES); final HttpHost result = planner.determineProxy(target("http"), anyRequest(), anyContext()); From c1bff9c27b0002de9b1b20b4615af751e1e8f4c8 Mon Sep 17 00:00:00 2001 From: spencergibb Date: Wed, 4 May 2022 18:11:34 -0400 Subject: [PATCH 18/18] Adds TestConfigServerApplication for use in tests. This avoids a classpath scanning issue which popped up with boot 2.7+ --- .../sample/ApplicationBootstrapTests.java | 2 +- .../test/java/sample/ApplicationTests.java | 2 +- ...igDataCustomMediaTypeIntegrationTests.java | 2 +- .../sample/ConfigDataIntegrationTests.java | 2 +- .../ConfigDataOrderingIntegrationTests.java | 2 +- .../sample/ServerNativeApplicationTests.java | 2 +- .../server/ConfigServerApplication.java | 2 ++ ...BootstrapConfigServerIntegrationTests.java | 3 +- .../server/CompositeClasspathTests.java | 13 ++++---- .../server/CompositeIntegrationTests.java | 5 +-- ...ackwardsCompatibilityIntegrationTests.java | 3 +- .../ConfigClientOffIntegrationTests.java | 3 +- ...CompositeConfigServerIntegrationTests.java | 3 +- .../CredhubConfigServerIntegrationTests.java | 3 +- .../NativeConfigServerIntegrationTests.java | 3 +- ...ubversionConfigServerIntegrationTests.java | 3 +- ...ransportConfigurationIntegrationTests.java | 17 +++++----- .../VanillaConfigServerIntegrationTests.java | 3 +- .../server/composite/CompositUtilsTests.java | 6 ++-- .../EncryptionIntegrationTests.java | 10 +++--- ...vironmentRepositoryConfigurationTests.java | 8 ++--- .../test/TestConfigServerApplication.java | 32 +++++++++++++++++++ 22 files changed, 87 insertions(+), 42 deletions(-) create mode 100644 spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/test/TestConfigServerApplication.java diff --git a/spring-cloud-config-sample/src/test/java/sample/ApplicationBootstrapTests.java b/spring-cloud-config-sample/src/test/java/sample/ApplicationBootstrapTests.java index 0f18678c..470e86a0 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ApplicationBootstrapTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ApplicationBootstrapTests.java @@ -72,7 +72,7 @@ public class ApplicationBootstrapTests { String baseDir = ConfigServerTestUtils.getBaseDirectory("spring-cloud-config-sample"); String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos", "config-repo", "target/config"); System.setProperty("repo1", repo); - server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class, + server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class, // FIXME: configdata why is use legacy needed here and above? "--spring.config.use-legacy-processing=true", "--server.port=" + configPort, "--spring.config.name=compositeserver", "--repo1=" + repo); diff --git a/spring-cloud-config-sample/src/test/java/sample/ApplicationTests.java b/spring-cloud-config-sample/src/test/java/sample/ApplicationTests.java index 2085e21a..73d1a5b6 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ApplicationTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ApplicationTests.java @@ -61,7 +61,7 @@ public class ApplicationTests { public static void startConfigServer() throws IOException { String baseDir = ConfigServerTestUtils.getBaseDirectory("spring-cloud-config-sample"); String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos", "config-repo", "target/config"); - server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class, + server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class, "--server.port=" + configPort, "--spring.config.name=server", "--spring.cloud.config.server.git.uri=" + repo); /* diff --git a/spring-cloud-config-sample/src/test/java/sample/ConfigDataCustomMediaTypeIntegrationTests.java b/spring-cloud-config-sample/src/test/java/sample/ConfigDataCustomMediaTypeIntegrationTests.java index e752f87b..5e2af30d 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ConfigDataCustomMediaTypeIntegrationTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ConfigDataCustomMediaTypeIntegrationTests.java @@ -66,7 +66,7 @@ public class ConfigDataCustomMediaTypeIntegrationTests { public static void startConfigServer() throws IOException { String baseDir = ConfigServerTestUtils.getBaseDirectory("spring-cloud-config-sample"); String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos", "config-repo", "target/config"); - server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class, + server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class, "--server.port=" + configPort, "--spring.config.name=server", "--spring.cloud.config.server.git.uri=" + repo); diff --git a/spring-cloud-config-sample/src/test/java/sample/ConfigDataIntegrationTests.java b/spring-cloud-config-sample/src/test/java/sample/ConfigDataIntegrationTests.java index 5e1d4963..aa14fe39 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ConfigDataIntegrationTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ConfigDataIntegrationTests.java @@ -59,7 +59,7 @@ public class ConfigDataIntegrationTests { public static void startConfigServer() throws IOException { String baseDir = ConfigServerTestUtils.getBaseDirectory("spring-cloud-config-sample"); String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos", "config-repo", "target/config"); - server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class, + server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class, "--server.port=" + configPort, "--spring.config.name=server", "--spring.cloud.config.server.git.uri=" + repo); diff --git a/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingIntegrationTests.java b/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingIntegrationTests.java index 4d861988..9ffaca6f 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingIntegrationTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingIntegrationTests.java @@ -60,7 +60,7 @@ public class ConfigDataOrderingIntegrationTests { @BeforeClass public static void startConfigServer() { - server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class, + server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class, "--spring.profiles.active=native", "--server.port=" + configPort, "--spring.config.name=server"); System.setProperty("spring.cloud.config.uri", "http://localhost:" + configPort); diff --git a/spring-cloud-config-sample/src/test/java/sample/ServerNativeApplicationTests.java b/spring-cloud-config-sample/src/test/java/sample/ServerNativeApplicationTests.java index d2f22ac4..fba10370 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ServerNativeApplicationTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ServerNativeApplicationTests.java @@ -52,7 +52,7 @@ public class ServerNativeApplicationTests { @BeforeClass public static void startConfigServer() throws IOException { String repo = ConfigServerTestUtils.prepareLocalRepo(); - server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class, + server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class, "--server.port=" + configPort, "--spring.config.name=server", "--spring.cloud.config.server.git.uri=" + repo, "--spring.profiles.active=native"); /* diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ConfigServerApplication.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ConfigServerApplication.java index 7bab622b..f4a73fed 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ConfigServerApplication.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ConfigServerApplication.java @@ -24,10 +24,12 @@ import org.springframework.context.annotation.Configuration; * Configuration server application. * * @author Dave Syer + * @deprecated Will be removed in 4.0.0. */ @Configuration(proxyBeanMethods = false) @EnableAutoConfiguration @EnableConfigServer +@Deprecated public class ConfigServerApplication { public static void main(String[] args) { diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java index 9cb7d4b1..102d9e7c 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/BootstrapConfigServerIntegrationTests.java @@ -31,6 +31,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; @@ -42,7 +43,7 @@ import static org.springframework.cloud.config.server.test.ConfigServerTestUtils import static org.springframework.cloud.config.server.test.ConfigServerTestUtils.getV2AcceptEntity; @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, properties = { "spring.cloud.bootstrap.enabled=true", +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.cloud.bootstrap.enabled=true", "logging.level.org.springframework.boot.context.config=TRACE", "spring.cloud.bootstrap.name:enable-bootstrap", "encrypt.rsa.algorithm=DEFAULT", "encrypt.rsa.strong=false" }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeClasspathTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeClasspathTests.java index 6571525b..b30b7ba0 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeClasspathTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeClasspathTests.java @@ -21,6 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.cloud.config.server.composite.CompositeUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.cloud.test.ClassPathExclusions; import org.springframework.cloud.test.ModifiedClassPathRunner; @@ -34,7 +35,7 @@ public class CompositeClasspathTests { @Test public void contextLoads() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.jmx.enabled=false", "spring.config.name:compositeconfigserver", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", @@ -54,7 +55,7 @@ public class CompositeClasspathTests { @Test public void contextLoads() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.jmx.enabled=false", "spring.config.name:compositeconfigserver", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", @@ -73,7 +74,7 @@ public class CompositeClasspathTests { @Test public void contextLoads() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.jmx.enabled=false", "spring.config.name:compositeconfigserver", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", @@ -93,7 +94,7 @@ public class CompositeClasspathTests { @Test public void contextLoads() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.jmx.enabled=false", "spring.config.name:compositeconfigserver", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", @@ -113,7 +114,7 @@ public class CompositeClasspathTests { @Test public void contextLoads() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.jmx.enabled=false", "spring.config.name:compositeconfigserver", "spring.cloud.config.server.composite[0].uri:file:///./target/repos/svn-config-repo", @@ -133,7 +134,7 @@ public class CompositeClasspathTests { @Test public void contextLoads() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.jmx.enabled=false", "spring.config.name:configserver", "spring.cloud.config.server.composite[0].uri:https://source.developers.google.com", diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeIntegrationTests.java index 8c97232b..f2ec4f89 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CompositeIntegrationTests.java @@ -27,6 +27,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.test.context.ActiveProfiles; @@ -43,7 +44,7 @@ import static org.springframework.cloud.config.server.test.ConfigServerTestUtils public class CompositeIntegrationTests { @RunWith(SpringRunner.class) - @SpringBootTest(classes = ConfigServerApplication.class, + @SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.config.name:compositeconfigserver", "spring.cloud.config.server.svn.uri:file:///./target/repos/svn-config-repo", "spring.cloud.config.server.svn.order:2", @@ -94,7 +95,7 @@ public class CompositeIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = ConfigServerApplication.class, + @SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.config.name:compositeconfigserver", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", "spring.cloud.config.server.composite[0].type:git", diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientBackwardsCompatibilityIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientBackwardsCompatibilityIntegrationTests.java index 4cf02a55..171dff1a 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientBackwardsCompatibilityIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientBackwardsCompatibilityIntegrationTests.java @@ -31,6 +31,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; @@ -42,7 +43,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen import static org.springframework.cloud.config.server.test.ConfigServerTestUtils.getV2AcceptEntity; @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, properties = { "spring.config.name:configserver" }, +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.config.name:configserver" }, webEnvironment = RANDOM_PORT) @ActiveProfiles({ "test", "native" }) public class ConfigClientBackwardsCompatibilityIntegrationTests { diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientOffIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientOffIntegrationTests.java index 1d15f842..adc97ab5 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientOffIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ConfigClientOffIntegrationTests.java @@ -36,6 +36,7 @@ import org.springframework.cloud.config.server.ConfigClientOffIntegrationTests.T import org.springframework.cloud.config.server.environment.EnvironmentRepository; import org.springframework.cloud.config.server.resource.ResourceRepository; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -83,7 +84,7 @@ public class ConfigClientOffIntegrationTests { } @Configuration(proxyBeanMethods = false) - @Import(ConfigServerApplication.class) + @Import(TestConfigServerApplication.class) protected static class TestConfiguration { @Bean diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubCompositeConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubCompositeConfigServerIntegrationTests.java index ca80fcc0..a14d3599 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubCompositeConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubCompositeConfigServerIntegrationTests.java @@ -23,6 +23,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +33,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen * @author Alberto C. Ríos */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.profiles.active:composite", "spring.cloud.config.server.composite[0].type:credhub", "spring.cloud.config.server.composite[0].url:https://credhub:8844" }, webEnvironment = RANDOM_PORT) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubConfigServerIntegrationTests.java index 46ee6eac..9817cf4a 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/CredhubConfigServerIntegrationTests.java @@ -23,6 +23,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +33,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen * @author Alberto C. Ríos */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, properties = { "spring.profiles.active:credhub", +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.profiles.active:credhub", "spring.cloud.config.server.credhub.url:https://credhub:8844" }, webEnvironment = RANDOM_PORT) public class CredhubConfigServerIntegrationTests extends CredhubIntegrationTest { diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/NativeConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/NativeConfigServerIntegrationTests.java index dfe900b1..86872562 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/NativeConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/NativeConfigServerIntegrationTests.java @@ -29,6 +29,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -41,7 +42,7 @@ import static org.springframework.cloud.config.server.test.ConfigServerTestUtils import static org.springframework.cloud.config.server.test.ConfigServerTestUtils.prepareLocalRepo; @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, properties = { "spring.config.name:configserver" }, +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.config.name:configserver" }, webEnvironment = RANDOM_PORT) @ActiveProfiles({ "test", "native" }) public class NativeConfigServerIntegrationTests { diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/SubversionConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/SubversionConfigServerIntegrationTests.java index 228d385a..d6acf60b 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/SubversionConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/SubversionConfigServerIntegrationTests.java @@ -30,6 +30,7 @@ import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.server.environment.SvnKitEnvironmentRepository; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; @@ -47,7 +48,7 @@ import static org.springframework.cloud.config.server.test.ConfigServerTestUtils * @author Roy Clarkson */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.config.name:configserver", "spring.cloud.config.server.svn.uri:file:///./target/repos/svn-config-repo", "logging.level.org.springframework.cloud=DEBUG" }, diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/TransportConfigurationIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/TransportConfigurationIntegrationTests.java index 7088ba99..13bf1711 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/TransportConfigurationIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/TransportConfigurationIntegrationTests.java @@ -36,6 +36,7 @@ import org.springframework.cloud.config.server.environment.MultipleJGitEnvironme import org.springframework.cloud.config.server.ssh.FileBasedSshTransportConfigCallback; import org.springframework.cloud.config.server.ssh.PropertiesBasedSshTransportConfigCallback; import org.springframework.cloud.config.server.ssh.SshPropertyValidator; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; @@ -53,7 +54,7 @@ public class TransportConfigurationIntegrationTests { public static class PropertyBasedCallbackTest { @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.additional-location=optional:file:/ssh/,optional:classpath:/ssh/", "spring.config.name:ssh-private-key-block" }) @@ -73,7 +74,7 @@ public class TransportConfigurationIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.additional-location=optional:file:/ssh/,optional:classpath:/ssh/", "spring.config.name:ssh-private-key-block-list" }) @@ -97,7 +98,7 @@ public class TransportConfigurationIntegrationTests { public static class PrivateKeyPropertyWithLineBreaks { @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.additional-location=optional:file:/ssh/,optional:classpath:/ssh/", "spring.config.name:ssh-private-key-newline" }) @@ -120,7 +121,7 @@ public class TransportConfigurationIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.additional-location=optional:file:/ssh/,optional:classpath:/ssh/", "spring.config.name:ssh-private-key-newline-list" }) @@ -147,7 +148,7 @@ public class TransportConfigurationIntegrationTests { public static class SshPropertiesWithinNestedRepo { @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.additional-location=optional:file:/ssh/,optional:classpath:/ssh/", "spring.config.name:ssh-nested-settings" }) @@ -175,7 +176,7 @@ public class TransportConfigurationIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.additional-location=optional:file:/ssh/,optional:classpath:/ssh/", "spring.config.name:ssh-nested-settings-list" }) @@ -207,7 +208,7 @@ public class TransportConfigurationIntegrationTests { public static class FileBasedCallbackTest { @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.cloud.config.server.git.uri=git@gitserver.com:team/repo.git", "spring.cloud.config.server.git.ignoreLocalSshSettings=false" }) @@ -259,7 +260,7 @@ public class TransportConfigurationIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class, SshPropertyValidator.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class, SshPropertyValidator.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.cloud.config.server.composite[0].type=git", "spring.cloud.config.server.composite[0].uri=git@gitserver.com:team/repo.git", diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/VanillaConfigServerIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/VanillaConfigServerIntegrationTests.java index 2caf5e00..76fcf7a1 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/VanillaConfigServerIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/VanillaConfigServerIntegrationTests.java @@ -30,6 +30,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -43,7 +44,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen import static org.springframework.cloud.config.server.test.ConfigServerTestUtils.getV2AcceptEntity; @RunWith(SpringRunner.class) -@SpringBootTest(classes = ConfigServerApplication.class, properties = { "spring.config.name:configserver", +@SpringBootTest(classes = TestConfigServerApplication.class, properties = { "spring.config.name:configserver", "spring.cloud.config.server.git.uri:file:./target/repos/config-repo" }, webEnvironment = RANDOM_PORT) @ActiveProfiles("test") public class VanillaConfigServerIntegrationTests { diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/composite/CompositUtilsTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/composite/CompositUtilsTests.java index 3460914d..3228239d 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/composite/CompositUtilsTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/composite/CompositUtilsTests.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; -import org.springframework.cloud.config.server.ConfigServerApplication; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ public class CompositUtilsTests { @Test public void getCompositeTypeListWorks() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.config.name:compositeconfigserver", "spring.jmx.enabled=false", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", @@ -51,7 +51,7 @@ public class CompositUtilsTests { public void getCompositeTypeListFails() { this.thrown.expect(IllegalStateException.class); - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active:test,composite", "spring.config.name:compositeconfigserver", "spring.jmx.enabled=false", "spring.cloud.config.server.composite[0].uri:file:./target/repos/config-repo", diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/encryption/EncryptionIntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/encryption/EncryptionIntegrationTests.java index 630f93e6..4912acda 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/encryption/EncryptionIntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/encryption/EncryptionIntegrationTests.java @@ -23,8 +23,8 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.cloud.config.server.ConfigServerApplication; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class EncryptionIntegrationTests { @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "spring.config.use-legacy-processing=true", "encrypt.key=foobar" }) @ActiveProfiles({ "test", "native" }) @@ -58,7 +58,7 @@ public class EncryptionIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class }, properties = { "spring.config.use-legacy-processing=true", "spring.cloud.bootstrap.name:symmetric-key-bootstrap" }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @@ -78,7 +78,7 @@ public class EncryptionIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class }, properties = { "spring.config.use-legacy-processing=true", "spring.cloud.bootstrap.name:keystore-bootstrap" }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @@ -98,7 +98,7 @@ public class EncryptionIntegrationTests { } @RunWith(SpringRunner.class) - @SpringBootTest(classes = { ConfigServerApplication.class }, + @SpringBootTest(classes = { TestConfigServerApplication.class }, properties = { "spring.config.use-legacy-processing=true", "spring.cloud.bootstrap.name:keystore-bootstrap", "spring.cloud.config.server.encrypt.enabled=false", "encrypt.keyStore.alias=myencryptionkey" }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JdbcEnvironmentRepositoryConfigurationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JdbcEnvironmentRepositoryConfigurationTests.java index dd245143..6bb6e5b1 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JdbcEnvironmentRepositoryConfigurationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JdbcEnvironmentRepositoryConfigurationTests.java @@ -26,8 +26,8 @@ import org.junit.Test; import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext; import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; -import org.springframework.cloud.config.server.ConfigServerApplication; import org.springframework.cloud.config.server.test.ConfigServerTestUtils; +import org.springframework.cloud.config.server.test.TestConfigServerApplication; import org.springframework.dao.DataAccessException; import static org.assertj.core.api.Assertions.assertThat; @@ -41,7 +41,7 @@ public class JdbcEnvironmentRepositoryConfigurationTests { @Test public void jdbcEnvironmentRepositoryBeansConfiguredWhenDefault() throws IOException { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active=test,jdbc", "spring.main.web-application-type=none") .run(context -> { assertThat(context).hasSingleBean(JdbcEnvironmentRepositoryFactory.class); @@ -52,7 +52,7 @@ public class JdbcEnvironmentRepositoryConfigurationTests { @Test public void jdbcEnvironmentRepositoryBeansConfiguredWitCustomResultSetExtractor() { - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withBean(CustomResultSetExtractor.class, CustomResultSetExtractor::new) .withPropertyValues("spring.profiles.active=test,jdbc", "spring.main.web-application-type=none") .run(context -> { @@ -85,7 +85,7 @@ public class JdbcEnvironmentRepositoryConfigurationTests { private void getApplicationContextWithJdbcEnabled(boolean jdbcEnabled, ContextConsumer consumer) throws IOException { String uri = ConfigServerTestUtils.prepareLocalRepo(); - new WebApplicationContextRunner().withUserConfiguration(ConfigServerApplication.class) + new WebApplicationContextRunner().withUserConfiguration(TestConfigServerApplication.class) .withPropertyValues("spring.profiles.active=test,jdbc", "spring.main.web-application-type=none", "spring.cloud.config.server.git.uri:" + uri, "spring.cloud.config.server.jdbc.enabled:" + jdbcEnabled) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/test/TestConfigServerApplication.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/test/TestConfigServerApplication.java new file mode 100644 index 00000000..5049ef47 --- /dev/null +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/test/TestConfigServerApplication.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.config.server.test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.cloud.config.server.EnableConfigServer; + +@EnableConfigServer +@SpringBootApplication +public class TestConfigServerApplication { + + public static void main(String[] args) { + new SpringApplicationBuilder(TestConfigServerApplication.class).properties("spring.config.name=configserver") + .run(args); + } + +}