1 Star 0 Fork 27

Dream of freedom / rpcblade

forked from 快鸟 / rpcblade 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

rpcblade

项目介绍

第三方对接利器,像本地接口一样调用RPC(http、socket、netty等)

实现说明

  1. 使用 dubbo spi 的思想,涉及到RPC调用中的编码、解码、发送协议都支持本地扩展
  2. 使用Spring FactoryBean,将自定义的 RPC 接口与 Spring 无缝集成。自动扫描 @RpcService 的 bean,纳入 Spring 容器管理

使用说明

如果与 Spring 配合使用,则需要先配置 Rpc 组件扫描器:

<bean class="com.kvn.blade.scan.RpcScannerConfigurer">
	<property name="basePackage" value="com.kvn.rpc.service" />
</bean>

参考:application.xml

  1. 调用http服务
@RpcService(protocol = "http", host = "172.16.21.28")
public interface HttpRpcService {
	
	@Addition("type=post&url=mockjsdata/35/refund/api/query/querySettlement")
	FooResponse call1030(FooRequest request);

}

参考:HttpRpcService.java

  1. 调用socket服务
@RpcService(protocol = "socket", host = "localhost:8091")
public interface SocketRpcService {
	
	XmlResponse call1030(XmlRequest request);

}

参考:SocketRpcService.java

  1. 调用netty服务
@RpcService(protocol = "netty", host = "localhost:8091")
public interface NettyRpcService {
	
	XmlResponse call1030(XmlRequest request);

}

参考:NettyRpcService.java

Empty file

About

第三方对接利器,像本地接口一样调用RPC(http、socket、netty等) expand collapse
Java
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/antonetwo/rpcblade.git
git@gitee.com:antonetwo/rpcblade.git
antonetwo
rpcblade
rpcblade
master

Search