Changes for 5.0.0 release
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-config</artifactId>
|
||||
<version>4.3.1-SNAPSHOT</version>
|
||||
<version>5.0.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -124,8 +124,8 @@ public class ConfigServerConfigDataResource extends ConfigDataResource {
|
||||
|
||||
private boolean uriEqual(String thisUriString, String thatUriString) {
|
||||
try {
|
||||
UriComponents thisUri = UriComponentsBuilder.fromHttpUrl(thisUriString).build();
|
||||
UriComponents thatUri = UriComponentsBuilder.fromHttpUrl(thatUriString).build();
|
||||
UriComponents thisUri = UriComponentsBuilder.fromUriString(thisUriString).build();
|
||||
UriComponents thatUri = UriComponentsBuilder.fromUriString(thatUriString).build();
|
||||
return Objects.equals(thisUri.getHost(), thatUri.getHost())
|
||||
&& Objects.equals(thisUri.getPort(), thatUri.getPort())
|
||||
&& Objects.equals(thisUri.getPath(), thatUri.getPath());
|
||||
@@ -138,7 +138,7 @@ public class ConfigServerConfigDataResource extends ConfigDataResource {
|
||||
private int urisHashCode(String[] uris) {
|
||||
return Arrays.stream(uris).mapToInt(uriString -> {
|
||||
try {
|
||||
UriComponents uriComponents = UriComponentsBuilder.fromHttpUrl(uriString).build();
|
||||
UriComponents uriComponents = UriComponentsBuilder.fromUriString(uriString).build();
|
||||
return Objects.hash(uriComponents.getHost(), uriComponents.getPath(), uriComponents.getPort());
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -263,7 +263,7 @@ public class ConfigServerConfigDataLoaderTests {
|
||||
String username = "user";
|
||||
String password = "pass";
|
||||
factory(properties).addAuthorizationToken(headers, username, password);
|
||||
assertThat(headers).hasSize(1);
|
||||
assertThat(headers.size()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -272,7 +272,7 @@ public class ConfigServerConfigDataLoaderTests {
|
||||
properties.getHeaders().put(AUTHORIZATION, "Basic dXNlcm5hbWU6cGFzc3dvcmQNCg==");
|
||||
String username = "user";
|
||||
factory(properties).addAuthorizationToken(headers, username, null);
|
||||
assertThat(headers).hasSize(1);
|
||||
assertThat(headers.size()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
|
||||
import org.springframework.beans.factory.support.InstanceSupplier;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.config.ConfigDataLocation;
|
||||
|
||||
@@ -254,7 +254,7 @@ public class ConfigServicePropertySourceLocatorTests {
|
||||
String username = "user";
|
||||
String password = "pass";
|
||||
factory(defaults).addAuthorizationToken(headers, username, password);
|
||||
assertThat(headers).hasSize(1);
|
||||
assertThat(headers.size()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -265,7 +265,7 @@ public class ConfigServicePropertySourceLocatorTests {
|
||||
String username = "user";
|
||||
String password = null;
|
||||
factory(defaults).addAuthorizationToken(headers, username, password);
|
||||
assertThat(headers).hasSize(1);
|
||||
assertThat(headers.size()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user