fix bugs
This commit is contained in:
@@ -10,7 +10,7 @@ jigsaw payment 支付系统,面向互联网商户提供的支付系统。 支
|
||||
|
||||
## 构建
|
||||
|
||||
你可以直接使用已发布的版本(http://repo.lixf.cn)。如果需要验证最新的版本,可以下载本项目的代码,使用JDK1.8,运行如下命令:
|
||||
你可以直接使用[已发布的版本](http://repo.lixf.cn)。如果需要验证最新的版本,可以下载本项目的代码,使用JDK1.8,运行如下命令:
|
||||
|
||||
```javascript
|
||||
mvn clean install
|
||||
@@ -34,4 +34,9 @@ RPC引擎服务器端示例。 展示如何通过springframework的@Component标
|
||||
|
||||
### jigsaw-rpc-example-client
|
||||
|
||||
RPC引擎客户端示例,和jigsaw-rpc-example-server配合使用。
|
||||
RPC引擎客户端示例,和jigsaw-rpc-example-server配合使用。
|
||||
|
||||
### jigsaw-rpc-schema
|
||||
|
||||
支付数据规范,使用Google Protocol Buffer格式来定义。
|
||||
|
||||
|
||||
+4
-2
@@ -3,8 +3,10 @@
|
||||
*/
|
||||
package org.jigsaw.payment.rpc.hello.server;
|
||||
|
||||
import org.apache.thrift.TException;
|
||||
import org.jigsaw.payment.Hello;
|
||||
import org.jigsaw.payment.rpc.NotFoundException;
|
||||
import org.jigsaw.payment.rpc.SystemException;
|
||||
import org.jigsaw.payment.rpc.UserException;
|
||||
import org.jigsaw.payment.rpc.server.Controller;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -18,7 +20,7 @@ public class FooController implements
|
||||
|
||||
@Override
|
||||
public Hello.FooResponse process(Hello.FooRequest request)
|
||||
throws TException {
|
||||
throws NotFoundException,SystemException,UserException {
|
||||
Hello.FooResponse.Builder response = Hello.FooResponse.newBuilder();
|
||||
response.setMessage("Foo " + request.getFirst() + "-"
|
||||
+ request.getSecond());
|
||||
|
||||
+4
-2
@@ -1,9 +1,11 @@
|
||||
package org.jigsaw.payment.rpc.hello.server;
|
||||
|
||||
import org.apache.thrift.TException;
|
||||
import org.jigsaw.payment.Hello;
|
||||
import org.jigsaw.payment.Hello.HelloRequest;
|
||||
import org.jigsaw.payment.Hello.HelloResponse;
|
||||
import org.jigsaw.payment.rpc.NotFoundException;
|
||||
import org.jigsaw.payment.rpc.SystemException;
|
||||
import org.jigsaw.payment.rpc.UserException;
|
||||
import org.jigsaw.payment.rpc.server.Controller;
|
||||
import org.springframework.stereotype.Component;
|
||||
/**
|
||||
@@ -17,7 +19,7 @@ public class HelloController implements Controller<Hello.HelloRequest, Hello.He
|
||||
|
||||
|
||||
@Override
|
||||
public HelloResponse process(HelloRequest request) throws TException {
|
||||
public HelloResponse process(HelloRequest request) throws NotFoundException,SystemException,UserException {
|
||||
HelloResponse.Builder builder = HelloResponse.newBuilder();
|
||||
builder.setMessage("Hello " + request.getUser().getName());
|
||||
return builder.build();
|
||||
|
||||
Reference in New Issue
Block a user