Fix RestTemplateEurekaHttpClient status update endpoint. Fixes #3571 (#3657)

This commit is contained in:
Ryan Baxter
2019-09-19 16:42:37 -04:00
committed by GitHub
parent b0b5459adb
commit ac9f021b92
2 changed files with 3 additions and 3 deletions

View File

@@ -144,8 +144,8 @@ public class EurekaClientAutoConfiguration {
.parseBoolean(getProperty("eureka.instance.secure-port-enabled"));
String serverContextPath = env.getProperty("server.servlet.context-path", "/");
int serverPort = Integer
.parseInt(env.getProperty("server.port", env.getProperty("port", "8080")));
int serverPort = Integer.parseInt(
env.getProperty("server.port", env.getProperty("port", "8080")));
Integer managementPort = env.getProperty("management.server.port", Integer.class);
String managementContextPath = env

View File

@@ -113,7 +113,7 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Void> statusUpdate(String appName, String id,
InstanceStatus newStatus, InstanceInfo info) {
String urlPath = serviceUrl + "apps/" + appName + '/' + id + "?status="
String urlPath = serviceUrl + "apps/" + appName + '/' + id + "/status?value="
+ newStatus.name() + "&lastDirtyTimestamp="
+ info.getLastDirtyTimestamp().toString();