This commit is contained in:
Redkale
2017-12-29 08:29:27 +08:00
parent b1abe91bd2
commit d83d6b5671
2 changed files with 7 additions and 0 deletions

View File

@@ -60,6 +60,11 @@ public class HelloService implements Service {
if (source != null) source.update(entity);
}
//修改记录
public void update2Hello(@RestAddress String clientAddr, @RestUploadFile byte[] fs) { //通过 /pipes/hello/update2?bean={...} 修改对象
System.out.println("修改记录2-" + nodeid + ": clientAddr = " + clientAddr + ", fs =" + fs);
}
//修改记录
@RestMapping(name = "partupdate")
public void updateHello(HelloEntity entity, @RestParam(name = "cols") String[] columns) { //通过 /pipes/hello/partupdate?bean={...}&cols=... 修改对象

View File

@@ -38,6 +38,8 @@ public class _DynHelloRestServlet1 extends SimpleRestServlet {
//headers.put(Rest.REST_HEADER_RESOURCE_NAME, "my-res");
String url = "http://127.0.0.1:" + port + "/pipes/hello/update?entity={}&bean2={}";
System.out.println(Utility.postHttpContent(url, headers, null));
url = "http://127.0.0.1:" + port + "/pipes/hello/update2?entity={}&bean2={}";
System.out.println(Utility.postHttpContent(url, headers, null));
url = "http://127.0.0.1:" + port + "/pipes/hello/asyncfind/1234";
System.out.println("异步查找: " + Utility.postHttpContent(url, headers, null));