Bumps to 2.1.0.BUILD-SNAPSHOT and updates for boot 2.1.0

This commit is contained in:
Spencer Gibb
2018-08-01 19:10:24 -04:00
parent 0395ad06cb
commit 513353b8e7
15 changed files with 32 additions and 35 deletions

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Config</name>
<description>Spring Cloud Config</description>
@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>2.0.3.RELEASE</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<scm>
@@ -22,7 +22,7 @@
</scm>
<properties>
<bintray.package>config</bintray.package>
<spring-cloud-commons.version>2.0.1.BUILD-SNAPSHOT</spring-cloud-commons.version>
<spring-cloud-commons.version>2.1.0.BUILD-SNAPSHOT</spring-cloud-commons.version>
</properties>
<modules>
<module>spring-cloud-config-dependencies</module>

View File

@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -65,7 +65,7 @@ public class ConfigClientAutoConfiguration {
protected static class ConfigServerHealthIndicatorConfiguration {
@Bean
public ConfigServerHealthIndicator configServerHealthIndicator(
public ConfigServerHealthIndicator clientConfigServerHealthIndicator(
ConfigServicePropertySourceLocator locator,
ConfigClientHealthProperties properties, Environment environment) {
return new ConfigServerHealthIndicator(locator, environment, properties);

View File

@@ -9,7 +9,7 @@ import org.junit.rules.ExpectedException;
import org.mockito.Mockito;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.test.util.EnvironmentTestUtils;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.cloud.client.DefaultServiceInstance;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
@@ -112,8 +112,8 @@ public abstract class BaseDiscoveryClientConfigServiceBootstrapConfigurationTest
void setup(String... env) {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context, env);
EnvironmentTestUtils.addEnvironment(this.context, "eureka.client.enabled=false");
TestPropertyValues.of(env).applyTo(this.context);
TestPropertyValues.of("eureka.client.enabled=false").applyTo(this.context);
this.context.getDefaultListableBeanFactory().registerSingleton("discoveryClient",
this.client);
this.context.register(UtilAutoConfiguration.class,

View File

@@ -17,7 +17,7 @@ package org.springframework.cloud.config.client;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.test.util.EnvironmentTestUtils;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.cloud.config.client.ConfigClientProperties.Credentials;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.StandardEnvironment;
@@ -122,7 +122,7 @@ public class ConfigClientPropertiesTests {
public void changeNameInOverride() {
locator.setName("one");
ConfigurableEnvironment environment = new StandardEnvironment();
EnvironmentTestUtils.addEnvironment(environment, "spring.application.name:two");
TestPropertyValues.of("spring.application.name:two").applyTo(environment);
ConfigClientProperties override = locator.override(environment);
assertEquals("two", override.getName());
}

View File

@@ -20,7 +20,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.util.EnvironmentTestUtils;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -54,7 +54,7 @@ public class ConfigServiceBootstrapConfigurationTest {
@Test
public void overrideConfigServicePropertySourceLocatorWhenBeanIsProvided() {
EnvironmentTestUtils.addEnvironment(this.context, "spring.cloud.config.enabled=true");
TestPropertyValues.of("spring.cloud.config.enabled=true").applyTo(this.context);
this.context.register(ConfigServicePropertySourceLocatorOverrideConfig.class);
this.context.register(ConfigServiceBootstrapConfiguration.class);
this.context.refresh();

View File

@@ -1,10 +1,5 @@
package org.springframework.cloud.config.client;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.io.ByteArrayInputStream;
import java.net.URI;
import java.util.HashMap;
@@ -12,13 +7,13 @@ import java.util.Iterator;
import java.util.Map;
import org.hamcrest.core.IsInstanceOf;
import org.hamcrest.core.IsNull;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.Matchers;
import org.mockito.Mockito;
import org.springframework.boot.test.util.EnvironmentTestUtils;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.GenericRequestHeaderInterceptor;
import org.springframework.cloud.config.environment.Environment;
import org.springframework.core.env.ConfigurableEnvironment;
@@ -34,12 +29,14 @@ import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.web.client.HttpServerErrorException;
import org.springframework.web.client.RestTemplate;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.springframework.cloud.config.client.ConfigClientProperties.AUTHORIZATION;
public class ConfigServicePropertySourceLocatorTests {
@@ -67,8 +64,8 @@ public class ConfigServicePropertySourceLocatorTests {
Environment body = new Environment("app", "master");
mockRequestResponseWithLabel(new ResponseEntity<>(body, HttpStatus.OK), "v1.0.0");
this.locator.setRestTemplate(this.restTemplate);
EnvironmentTestUtils.addEnvironment(this.environment,
"spring.cloud.config.label:v1.0.0");
TestPropertyValues.of("spring.cloud.config.label:v1.0.0")
.applyTo(this.environment);
assertNotNull(this.locator.locate(this.environment));
}
@@ -78,8 +75,8 @@ public class ConfigServicePropertySourceLocatorTests {
mockRequestResponseWithLabel(new ResponseEntity<>(body, HttpStatus.OK),
"release(_)v1.0.0");
this.locator.setRestTemplate(this.restTemplate);
EnvironmentTestUtils.addEnvironment(this.environment,
"spring.cloud.config.label:release/v1.0.0");
TestPropertyValues.of("spring.cloud.config.label:release/v1.0.0")
.applyTo(this.environment);
assertNotNull(this.locator.locate(this.environment));
}

View File

@@ -5,11 +5,11 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>2.0.3.RELEASE</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-config-dependencies</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>spring-cloud-config-dependencies</name>
<description>Spring Cloud Config Dependencies</description>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-config-monitor</artifactId>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -191,7 +191,7 @@ public class EnvironmentRepositoryConfiguration {
}
@Configuration
@ConditionalOnMissingBean(value = EnvironmentRepository.class, search = SearchStrategy.CURRENT)
@ConditionalOnMissingBean(value = EnvironmentRepository.class)//, search = SearchStrategy.CURRENT)
class DefaultRepositoryConfiguration {
@Autowired
private ConfigurableEnvironment environment;

View File

@@ -217,7 +217,7 @@ public class MultipleJGitEnvironmentRepositoryIntegrationTests {
String defaultRepoUri = ConfigServerTestUtils.prepareLocalRepo("config-repo");
expected.expectCause(ThrowableMessageMatcher
.hasMessage(containsString("Cannot write parent")));
this.context = new SpringApplicationBuilder(TestConfiguration.class).web(false)
this.context = new SpringApplicationBuilder(TestConfiguration.class).web(WebApplicationType.NONE)
.properties("spring.cloud.config.server.git.uri:" + defaultRepoUri,
"spring.cloud.config.server.git.basedir:/tmp")
.run();

View File

@@ -5,10 +5,10 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-starter-config</artifactId>
<version>2.0.2.BUILD-SNAPSHOT</version>
<version>2.1.0.BUILD-SNAPSHOT</version>
<name>spring-cloud-starter-config</name>
<description>Spring Cloud Starter</description>
<url>https://projects.spring.io/spring-cloud</url>