From d176c6716ebd820bd55b9af261446cf9f4b1b76d Mon Sep 17 00:00:00 2001 From: moremind Date: Fri, 22 Dec 2023 20:25:38 +0800 Subject: [PATCH] [type:fix] fix nacosServiceInstance scheme npe (#3545) * fix nacos scheme npe --- .../java/com/alibaba/cloud/nacos/NacosServiceInstance.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosServiceInstance.java b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosServiceInstance.java index 690f1adbc..a5d409b9a 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosServiceInstance.java +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosServiceInstance.java @@ -68,6 +68,11 @@ public class NacosServiceInstance implements ServiceInstance { return metadata; } + @Override + public String getScheme() { + return getUri().getScheme(); + } + public void setServiceId(String serviceId) { this.serviceId = serviceId; }