From 1fdb495229a6685a0eee0ba35b4d44eaf92c4e94 Mon Sep 17 00:00:00 2001 From: Nikita Konev Date: Fri, 6 Mar 2020 02:30:31 +0300 Subject: [PATCH] fix Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format --- .../serviceregistry/endpoint/ServiceRegistryEndpoint.java | 2 +- .../endpoint/ServiceRegistryEndpointTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpoint.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpoint.java index cadad9ba0..1e085c5a0 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpoint.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpoint.java @@ -31,7 +31,7 @@ * @author Spencer Gibb */ @SuppressWarnings("unchecked") -@Endpoint(id = "service-registry") +@Endpoint(id = "serviceregistry") public class ServiceRegistryEndpoint { private final ServiceRegistry serviceRegistry; diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointTests.java index a5312a550..70261fd1f 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointTests.java @@ -71,14 +71,14 @@ public class ServiceRegistryEndpointTests { @Test public void testGet() throws Exception { - this.mvc.perform(get(BASE_PATH + "/service-registry")).andExpect(status().isOk()) + this.mvc.perform(get(BASE_PATH + "/serviceregistry")).andExpect(status().isOk()) .andExpect(content().string(containsString(MYSTATUS))); } @Test public void testPost() throws Exception { Map status = Collections.singletonMap("status", UPDATED_STATUS); - this.mvc.perform(post(BASE_PATH + "/service-registry") + this.mvc.perform(post(BASE_PATH + "/serviceregistry") .content(new ObjectMapper().writeValueAsString(status)) .contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk()); then(this.serviceRegistry.getUpdatedStatus().get()).isEqualTo(UPDATED_STATUS);