Commit be6d1d41 by Johannes Edmeier

Merge branch '1.3.x'

parents 918201c2 c6e45d74
......@@ -18,7 +18,7 @@
<java.version>1.7</java.version>
<main.basedir>${basedir}</main.basedir>
<spring-boot.version>1.4.0.RC1</spring-boot.version>
<spring-cloud.version>Brixton.SR2</spring-cloud.version>
<spring-cloud.version>Brixton.SR3</spring-cloud.version>
<build-plugin.jacoco.version>0.7.7.201606060606</build-plugin.jacoco.version>
<build-plugin.coveralls.version>4.2.0</build-plugin.coveralls.version>
<build-plugin.gpg.version>1.6</build-plugin.gpg.version>
......
......@@ -104,9 +104,7 @@ public class AdminClientProperties {
server.getContextPath()), management.getContextPath());
}
return append(
append(createLocalUri(getHostAddress().getCanonicalHostName(), managementPort),
server.getContextPath()),
return append(createLocalUri(getHostAddress().getCanonicalHostName(), managementPort),
management.getContextPath());
}
......
......@@ -61,6 +61,22 @@ public class AdminClientPropertiesTest {
}
@Test
public void test_contextPatht_mgmtPortPath() {
load("server.context-path=app", "management.context-path=/admin", "local.server.port=8080",
"local.management.port=8081");
AdminClientProperties clientProperties = new AdminClientProperties();
context.getAutowireCapableBeanFactory().autowireBean(clientProperties);
publishApplicationReadyEvent(clientProperties);
assertThat(clientProperties.getManagementUrl(),
is("http://" + getHostname() + ":8081/admin"));
assertThat(clientProperties.getHealthUrl(),
is("http://" + getHostname() + ":8081/admin/health"));
assertThat(clientProperties.getServiceUrl(), is("http://" + getHostname() + ":8080/app"));
}
@Test
public void test_contextPath() {
load("server.context-path=app", "local.server.port=80");
AdminClientProperties clientProperties = new AdminClientProperties();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment