Commit 44f788f4 by huangfusuper

修改插件rpc的错误

parent fefaacda
...@@ -83,6 +83,14 @@ ...@@ -83,6 +83,14 @@
<version>${protostuff.version}</version> <version>${protostuff.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.objenesis</groupId> <groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId> <artifactId>objenesis</artifactId>
......
...@@ -15,7 +15,7 @@ import com.byit.rpc.remoting.provider.RpcProviderFactory; ...@@ -15,7 +15,7 @@ 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 io.netty.util.internal.StringUtil; import org.eclipse.jetty.util.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -182,7 +182,7 @@ public class RpcReferenceBean { ...@@ -182,7 +182,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.isNullOrEmpty(serverName)){ if(StringUtil.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 io.netty.util.internal.StringUtil; import org.eclipse.jetty.util.StringUtil;
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.isNullOrEmpty(serverName)){ if(StringUtil.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