Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vnt-dev authored Mar 2, 2020
1 parent edf1375 commit 72dea4f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ wherewego.rpc.protocol.name=wqRpc
wherewego.rpc.application.name=wqRpc
```
4.服务提供者编写接口
例:

在启动类上加入注解,加入注解MyRPC才能启动
```
//包路径为com.wherewego.rpc.config.annotation
@EnableMyRPC
```

测试代码,例:
```
public interface ITest{
int add(int a,int b);
Expand All @@ -39,9 +46,16 @@ public class TestImpl implements ITest{
}
```
5.消费者调用服务端接口
例:

在启动类上加入注解,加入注解MyRPC才能启动
```
//包路径为com.wherewego.rpc.config.annotation
@EnableMyRPC
```

测试代码,例:
```
//使用myrpc提供的注解
//使用myrpc提供的注解 在com.wherewego.rpc.config.annotation包下
@Reference
private ITest test;
public void test(){
Expand Down

0 comments on commit 72dea4f

Please sign in to comment.