This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 474505b optimization client build path (#2172)
474505b is described below
commit 474505b6ec34069ea7dd7b20555bbec2f5f74be1
Author: sunrui849 <[email protected]>
AuthorDate: Thu Sep 30 10:51:00 2021 +0800
optimization client build path (#2172)
Co-authored-by: [email protected] <[email protected]>
---
.../client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java | 9 +++++----
.../client/apache/dubbo/ApacheDubboServiceBeanListener.java | 7 ++++---
.../apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java | 9 +++++----
.../client/springcloud/init/ContextRegisterListener.java | 6 +++---
.../springcloud/init/SpringCloudClientBeanPostProcessor.java | 10 ++++++++--
.../shenyu/client/springmvc/init/ContextRegisterListener.java | 6 +++---
.../springmvc/init/SpringMvcClientBeanPostProcessor.java | 7 ++++---
.../shenyu/client/motan/MotanServiceBeanPostProcessor.java | 3 ++-
.../shenyu/client/sofa/SofaServiceBeanPostProcessor.java | 7 ++++---
.../shenyu/client/tars/TarsServiceBeanPostProcessor.java | 7 ++++---
10 files changed, 42 insertions(+), 29 deletions(-)
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
index 2e61abc..25111ff 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
@@ -18,9 +18,9 @@
package org.apache.shenyu.client.alibaba.dubbo;
import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.utils.StringUtils;
import com.alibaba.dubbo.config.spring.ServiceBean;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
import org.apache.shenyu.client.dubbo.common.dto.DubboRpcExt;
@@ -35,6 +35,7 @@ import
org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Map;
import java.util.Objects;
@@ -68,8 +69,8 @@ public class AlibabaDubboServiceBeanListener implements
ApplicationListener<Cont
Properties props = config.getProps();
String contextPath = props.getProperty("contextPath");
String appName = props.getProperty("appName");
- if (StringUtils.isEmpty(contextPath)) {
- throw new RuntimeException("apache dubbo client must config the
contextPath");
+ if (StringUtils.isEmpty(contextPath) || contextPath.charAt(0) != '/') {
+ throw new RuntimeException("apache dubbo client must config the
contextPath and must begin with '/'");
}
this.contextPath = contextPath;
this.appName = appName;
@@ -99,7 +100,7 @@ public class AlibabaDubboServiceBeanListener implements
ApplicationListener<Cont
if (StringUtils.isEmpty(appName)) {
appName = serviceBean.getApplication().getName();
}
- String path = contextPath + shenyuDubboClient.path();
+ String path = Paths.get(contextPath,
shenyuDubboClient.path()).toString();
String desc = shenyuDubboClient.desc();
String serviceName = serviceBean.getInterface();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
diff --git
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
index b453658..729df54 100644
---
a/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
+++
b/shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
@@ -35,6 +35,7 @@ import
org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Map;
import java.util.Objects;
@@ -68,8 +69,8 @@ public class ApacheDubboServiceBeanListener implements
ApplicationListener<Conte
Properties props = config.getProps();
String contextPath = props.getProperty("contextPath");
String appName = props.getProperty("appName");
- if (StringUtils.isEmpty(contextPath)) {
- throw new RuntimeException("apache dubbo client must config the
contextPath");
+ if (StringUtils.isEmpty(contextPath) || contextPath.charAt(0) != '/') {
+ throw new RuntimeException("apache dubbo client must config the
contextPath and must begin with '/'");
}
this.contextPath = contextPath;
this.appName = appName;
@@ -99,7 +100,7 @@ public class ApacheDubboServiceBeanListener implements
ApplicationListener<Conte
if (StringUtils.isEmpty(appName)) {
appName = serviceBean.getApplication().getName();
}
- String path = contextPath + shenyuDubboClient.path();
+ String path = Paths.get(contextPath,
shenyuDubboClient.path()).toString();
String desc = shenyuDubboClient.desc();
String serviceName = serviceBean.getInterface();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
diff --git
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
index 9945df2..6a4e15f 100644
---
a/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-grpc/src/main/java/org/apache/shenyu/client/grpc/GrpcClientBeanPostProcessor.java
@@ -22,6 +22,7 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.grpc.BindableService;
import io.grpc.MethodDescriptor;
import io.grpc.ServerServiceDefinition;
+import org.apache.commons.lang3.StringUtils;
import
org.apache.shenyu.client.core.disruptor.ShenyuClientRegisterEventPublisher;
import org.apache.shenyu.client.grpc.common.annotation.ShenyuGrpcClient;
import org.apache.shenyu.client.grpc.common.dto.GrpcExt;
@@ -37,10 +38,10 @@ import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.lang.NonNull;
import org.springframework.util.ReflectionUtils;
-import org.springframework.util.StringUtils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@@ -81,8 +82,8 @@ public class GrpcClientBeanPostProcessor implements
BeanPostProcessor {
String contextPath = props.getProperty("contextPath");
String ipAndPort = props.getProperty("ipAndPort");
String port = props.getProperty("port");
- if (StringUtils.isEmpty(contextPath) || StringUtils.isEmpty(ipAndPort)
|| StringUtils.isEmpty(port)) {
- throw new RuntimeException("grpc client must config the
contextPath, ipAndPort");
+ if (StringUtils.isAnyBlank(contextPath, ipAndPort, port) ||
contextPath.charAt(0) != '/') {
+ throw new RuntimeException("grpc client must config the
contextPath, ipAndPort, and contextPath must begin with '/'");
}
this.ipAndPort = ipAndPort;
this.contextPath = contextPath;
@@ -135,7 +136,7 @@ public class GrpcClientBeanPostProcessor implements
BeanPostProcessor {
}
private MetaDataRegisterDTO buildMetaDataDTO(final String packageName,
final ShenyuGrpcClient shenyuGrpcClient, final Method method) {
- String path = this.contextPath + shenyuGrpcClient.path();
+ String path = Paths.get(contextPath,
shenyuGrpcClient.path()).toString();
String desc = shenyuGrpcClient.desc();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
String configRuleName = shenyuGrpcClient.ruleName();
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
index a0be5e2..f5c9aa5 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/ContextRegisterListener.java
@@ -31,6 +31,7 @@ import
org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.env.Environment;
import org.springframework.lang.NonNull;
+import java.nio.file.Paths;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -69,8 +70,7 @@ public class ContextRegisterListener implements
ApplicationListener<ContextRefre
String serverLists = config.getServerLists();
String contextPath = props.getProperty("contextPath");
String appName = env.getProperty("spring.application.name");
- if (StringUtils.isBlank(contextPath) ||
StringUtils.isBlank(registerType)
- || StringUtils.isBlank(serverLists) ||
StringUtils.isBlank(appName)) {
+ if (StringUtils.isAnyBlank(contextPath, registerType, serverLists,
appName)) {
String errorMsg = "spring cloud param must config the
contextPath ,registerType , serverLists and appName";
LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
@@ -96,7 +96,7 @@ public class ContextRegisterListener implements
ApplicationListener<ContextRefre
String appName = env.getProperty("spring.application.name");
Integer port = env.getProperty("server.port", Integer.class, 8080);
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
- String path = contextPath + "/**";
+ String path = Paths.get("/", contextPath, "/**").toString();
return MetaDataRegisterDTO.builder()
.contextPath(contextPath)
.appName(appName)
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
index 4240282..1be0b01 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springcloud/src/main/java/org/apache/shenyu/client/springcloud/init/SpringCloudClientBeanPostProcessor.java
@@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
@@ -77,7 +78,7 @@ public class SpringCloudClientBeanPostProcessor implements
BeanPostProcessor {
String registerType = config.getRegisterType();
String serverLists = config.getServerLists();
String appName = env.getProperty("spring.application.name");
- if (StringUtils.isBlank(registerType) ||
StringUtils.isBlank(serverLists) || StringUtils.isBlank(appName)) {
+ if (StringUtils.isAnyBlank(registerType, serverLists, appName)) {
String errorMsg = "spring cloud param must config the registerType
, serverLists and appName";
LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
@@ -128,7 +129,12 @@ public class SpringCloudClientBeanPostProcessor implements
BeanPostProcessor {
private MetaDataRegisterDTO buildMetaDataDTO(final ShenyuSpringCloudClient
shenyuSpringCloudClient, final String prePath) {
String contextPath = StringUtils.isBlank(this.contextPath) ?
this.servletContextPath : this.contextPath;
String appName = env.getProperty("spring.application.name");
- String path = contextPath + prePath + shenyuSpringCloudClient.path();
+ String path;
+ if (StringUtils.isEmpty(contextPath)) {
+ path = Paths.get("/", prePath,
shenyuSpringCloudClient.path()).toString();
+ } else {
+ path = Paths.get("/", contextPath, prePath,
shenyuSpringCloudClient.path()).toString();
+ }
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
int port = StringUtils.isBlank(this.port) ? -1 :
Integer.parseInt(this.port);
String desc = shenyuSpringCloudClient.desc();
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
index 2631086..b87767d 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/ContextRegisterListener.java
@@ -30,6 +30,7 @@ import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.lang.NonNull;
+import java.nio.file.Paths;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -68,8 +69,7 @@ public class ContextRegisterListener implements
ApplicationListener<ContextRefre
String serverLists = config.getServerLists();
String contextPath = props.getProperty("contextPath");
int port = Integer.parseInt(props.getProperty("port"));
- if (StringUtils.isBlank(contextPath) ||
StringUtils.isBlank(registerType)
- || StringUtils.isBlank(serverLists) || port <= 0) {
+ if (StringUtils.isAnyBlank(contextPath, registerType, serverLists)
|| port <= 0) {
String errorMsg = "http register param must config the
contextPath, registerType , serverLists and port must > 0";
LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
@@ -97,7 +97,7 @@ public class ContextRegisterListener implements
ApplicationListener<ContextRefre
String contextPath = this.contextPath;
String appName = this.appName;
Integer port = this.port;
- String path = contextPath + "/**";
+ String path = Paths.get("/", contextPath, "/**").toString();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
return MetaDataRegisterDTO.builder()
.contextPath(contextPath)
diff --git
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
index 31cce98..19e1975 100644
---
a/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/init/SpringMvcClientBeanPostProcessor.java
@@ -36,6 +36,7 @@ import org.springframework.util.ReflectionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
@@ -70,7 +71,7 @@ public class SpringMvcClientBeanPostProcessor implements
BeanPostProcessor {
String serverLists = config.getServerLists();
Properties props = config.getProps();
int port = Integer.parseInt(props.getProperty("port"));
- if (StringUtils.isBlank(registerType) ||
StringUtils.isBlank(serverLists) || port <= 0) {
+ if (StringUtils.isAnyBlank(registerType, serverLists) || port <= 0) {
String errorMsg = "http register param must config the
registerType , serverLists and port must > 0";
LOG.error(errorMsg);
throw new RuntimeException(errorMsg);
@@ -121,9 +122,9 @@ public class SpringMvcClientBeanPostProcessor implements
BeanPostProcessor {
Integer port = this.port;
String path;
if (StringUtils.isEmpty(contextPath)) {
- path = prePath + shenyuSpringMvcClient.path();
+ path = Paths.get("/", prePath,
shenyuSpringMvcClient.path()).toString();
} else {
- path = contextPath + prePath + shenyuSpringMvcClient.path();
+ path = Paths.get("/", contextPath, prePath,
shenyuSpringMvcClient.path()).toString();
}
String desc = shenyuSpringMvcClient.desc();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
diff --git
a/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
b/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
index f38358f..4aa9fce 100644
---
a/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java
@@ -39,6 +39,7 @@ import
org.springframework.core.LocalVariableTableParameterNameDiscoverer;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -121,7 +122,7 @@ public class MotanServiceBeanPostProcessor implements
BeanPostProcessor, Applica
private MetaDataRegisterDTO buildMetaDataDTO(final Class<?> clazz, final
MotanService service,
final ShenyuMotanClient
shenyuMotanClient, final Method method, final String rpcExt) {
String appName = this.appName;
- String path = this.contextPath + shenyuMotanClient.path();
+ String path = Paths.get("/", this.contextPath,
shenyuMotanClient.path()).toString();
String desc = shenyuMotanClient.desc();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
int port = StringUtils.isBlank(this.port) ? -1 :
Integer.parseInt(this.port);
diff --git
a/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
b/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
index be563c1..e87b008 100644
---
a/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-sofa/src/main/java/org/apache/shenyu/client/sofa/SofaServiceBeanPostProcessor.java
@@ -39,6 +39,7 @@ import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Objects;
import java.util.Properties;
@@ -69,8 +70,8 @@ public class SofaServiceBeanPostProcessor implements
BeanPostProcessor {
Properties props = config.getProps();
String contextPath = props.getProperty("contextPath");
String appName = props.getProperty("appName");
- if (StringUtils.isEmpty(contextPath)) {
- throw new RuntimeException("sofa client must config the
contextPath");
+ if (StringUtils.isEmpty(contextPath) || contextPath.charAt(0) != '/') {
+ throw new RuntimeException("sofa client must config the
contextPath and contextPath must begin with '/'");
}
this.contextPath = contextPath;
this.appName = appName;
@@ -112,7 +113,7 @@ public class SofaServiceBeanPostProcessor implements
BeanPostProcessor {
private MetaDataRegisterDTO buildMetaDataDTO(final ServiceFactoryBean
serviceBean, final ShenyuSofaClient shenyuSofaClient, final Method method) {
String appName = this.appName;
- String path = contextPath + shenyuSofaClient.path();
+ String path = Paths.get(this.contextPath,
shenyuSofaClient.path()).toString();
String desc = shenyuSofaClient.desc();
String serviceName = serviceBean.getInterfaceClass().getName();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
diff --git
a/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
b/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
index 16adc75..53b9451 100644
---
a/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
+++
b/shenyu-client/shenyu-client-tars/src/main/java/org/apache/shenyu/client/tars/TarsServiceBeanPostProcessor.java
@@ -36,6 +36,7 @@ import
org.springframework.core.LocalVariableTableParameterNameDiscoverer;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -69,8 +70,8 @@ public class TarsServiceBeanPostProcessor implements
BeanPostProcessor {
String contextPath = props.getProperty("contextPath");
String ip = props.getProperty("host");
String port = props.getProperty("port");
- if (StringUtils.isEmpty(contextPath) || StringUtils.isEmpty(ip) ||
StringUtils.isEmpty(port)) {
- throw new RuntimeException("tars client must config the
contextPath, ipAndPort");
+ if (StringUtils.isAnyBlank(contextPath, ip, port) ||
contextPath.charAt(0) != '/') {
+ throw new RuntimeException("tars client must config the
contextPath, ipAndPort, and contextPath must begin with '/'");
}
this.contextPath = contextPath;
this.ipAndPort = ip + ":" + port;
@@ -105,7 +106,7 @@ public class TarsServiceBeanPostProcessor implements
BeanPostProcessor {
private MetaDataRegisterDTO buildMetaDataDTO(final String serviceName,
final ShenyuTarsClient shenyuTarsClient, final Method method, final String
rpcExt) {
String ipAndPort = this.ipAndPort;
- String path = this.contextPath + shenyuTarsClient.path();
+ String path = Paths.get(this.contextPath,
shenyuTarsClient.path()).toString();
String desc = shenyuTarsClient.desc();
String host = IpUtils.isCompleteHost(this.host) ? this.host :
IpUtils.getHost(this.host);
String configRuleName = shenyuTarsClient.ruleName();