Commit a5c01a4d by huangfusuper

修改插件rpc的错误

parent 44f788f4
...@@ -15,12 +15,10 @@ import com.byit.rpc.remoting.provider.RpcProviderFactory; ...@@ -15,12 +15,10 @@ import com.byit.rpc.remoting.provider.RpcProviderFactory;
import com.byit.rpc.serialize.Serializer; import com.byit.rpc.serialize.Serializer;
import com.byit.rpc.util.ClassUtil; import com.byit.rpc.util.ClassUtil;
import com.byit.rpc.util.RpcException; import com.byit.rpc.util.RpcException;
import org.eclipse.jetty.util.StringUtil; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy; import java.lang.reflect.Proxy;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.UUID; import java.util.UUID;
...@@ -182,7 +180,7 @@ public class RpcReferenceBean { ...@@ -182,7 +180,7 @@ public class RpcReferenceBean {
if (finalAddress==null || finalAddress.trim().length()==0) { if (finalAddress==null || finalAddress.trim().length()==0) {
if (invokerFactory!=null && invokerFactory.getServiceRegistry()!=null) { if (invokerFactory!=null && invokerFactory.getServiceRegistry()!=null) {
// discovery // discovery
if(StringUtil.isBlank(serverName)){ if(StringUtils.isBlank(serverName)){
this.serverName = className; this.serverName = className;
} }
String serviceKey = RpcProviderFactory.makeServiceKey(this.serverName, varsion_); String serviceKey = RpcProviderFactory.makeServiceKey(this.serverName, varsion_);
......
...@@ -6,7 +6,7 @@ import com.byit.rpc.remoting.provider.RpcProviderFactory; ...@@ -6,7 +6,7 @@ import com.byit.rpc.remoting.provider.RpcProviderFactory;
import com.byit.rpc.remoting.provider.annotation.RpcService; import com.byit.rpc.remoting.provider.annotation.RpcService;
import com.byit.rpc.serialize.Serializer; import com.byit.rpc.serialize.Serializer;
import com.byit.rpc.util.RpcException; import com.byit.rpc.util.RpcException;
import org.eclipse.jetty.util.StringUtil; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
...@@ -125,7 +125,7 @@ public class RpcSpringProviderFactory extends RpcProviderFactory implements Appl ...@@ -125,7 +125,7 @@ public class RpcSpringProviderFactory extends RpcProviderFactory implements Appl
//String iface = serviceBean.getClass().getInterfaces()[0].getName(); //String iface = serviceBean.getClass().getInterfaces()[0].getName();
String serverName = rpcService.serverName(); String serverName = rpcService.serverName();
if(StringUtil.isBlank(serverName)){ if(StringUtils.isBlank(serverName)){
serverName = serviceBean.getClass().getInterfaces()[0].getName(); serverName = serviceBean.getClass().getInterfaces()[0].getName();
} }
String version = rpcService.version(); String version = rpcService.version();
......
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