From f16beca68060b867e20a30f28b71883e6d7472f6 Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Thu, 8 Sep 2016 09:18:46 +0800 Subject: [PATCH] --- test/org/redkale/test/rest/HelloBean.java | 2 +- test/org/redkale/test/rest/HelloEntity.java | 4 ++-- test/org/redkale/test/rest/HelloService.java | 4 ++-- test/org/redkale/test/rest/HelloService2.java | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/org/redkale/test/rest/HelloBean.java b/test/org/redkale/test/rest/HelloBean.java index 8a01cfa84..1e479b448 100644 --- a/test/org/redkale/test/rest/HelloBean.java +++ b/test/org/redkale/test/rest/HelloBean.java @@ -8,7 +8,7 @@ public class HelloBean implements FilterBean { private int helloid; - @RestHeader("hello-res") + @RestHeader(name = "hello-res") private String res; public int getHelloid() { diff --git a/test/org/redkale/test/rest/HelloEntity.java b/test/org/redkale/test/rest/HelloEntity.java index 6fff93c15..983e68a49 100644 --- a/test/org/redkale/test/rest/HelloEntity.java +++ b/test/org/redkale/test/rest/HelloEntity.java @@ -19,9 +19,9 @@ public class HelloEntity { private long createtime; - @RestHeader("hello-res") + @RestHeader(name = "hello-res") private String resname; - + @RestAddress private String clientaddr; diff --git a/test/org/redkale/test/rest/HelloService.java b/test/org/redkale/test/rest/HelloService.java index e8078a6bd..ea083a869 100644 --- a/test/org/redkale/test/rest/HelloService.java +++ b/test/org/redkale/test/rest/HelloService.java @@ -53,7 +53,7 @@ public class HelloService implements Service { //修改记录 @RestMapping(name = "partupdate") - public void updateHello(HelloEntity entity, @RestParam("cols") String[] columns) { //通过 /hello/partupdate?bean={...} 修改对象 + public void updateHello(HelloEntity entity, @RestParam(name = "cols") String[] columns) { //通过 /hello/partupdate?bean={...} 修改对象 entity.setUpdatetime(System.currentTimeMillis()); source.updateColumns(entity, columns); } @@ -72,7 +72,7 @@ public class HelloService implements Service { //查询单个 @RestMapping(name = "find") @RestMapping(name = "jsfind", jsvar = "varhello") - public HelloEntity findHello(@RestParam("#") int id) { //通过 /hello/find/1234 查询对象 + public HelloEntity findHello(@RestParam(name = "#") int id) { //通过 /hello/find/1234 查询对象 return source.find(HelloEntity.class, id); } diff --git a/test/org/redkale/test/rest/HelloService2.java b/test/org/redkale/test/rest/HelloService2.java index 761d6cd8c..22688f49c 100644 --- a/test/org/redkale/test/rest/HelloService2.java +++ b/test/org/redkale/test/rest/HelloService2.java @@ -19,7 +19,7 @@ import org.redkale.util.Sheet; * HelloBean: Hellow模块实现FilterBean的过滤Bean类 * */ -@RestService(value = "hello", module = 0, repair = true, ignore = false) +@RestService(name = "hello", moduleid = 0, repair = true, ignore = false) public class HelloService2 implements Service { @Resource @@ -27,7 +27,7 @@ public class HelloService2 implements Service { //增加记录 @RestMapping(name = "create", auth = false) - public RetResult createHello(UserInfo info, @RestParam("bean") HelloEntity entity) { + public RetResult createHello(UserInfo info, @RestParam(name = "bean") HelloEntity entity) { entity.setCreator(info == null ? 0 : info.getUserid()); //设置当前用户ID entity.setCreatetime(System.currentTimeMillis()); source.insert(entity); @@ -36,26 +36,26 @@ public class HelloService2 implements Service { //删除记录 @RestMapping(name = "delete", auth = false) - public void deleteHello(@RestParam("#") int id) { //通过 /hello/delete/1234 删除对象 + public void deleteHello(@RestParam(name = "#") int id) { //通过 /hello/delete/1234 删除对象 source.delete(HelloEntity.class, id); } //修改记录 @RestMapping(name = "update", auth = false) - public void updateHello(@RestParam("bean") HelloEntity entity) { //通过 /hello/update?bean={...} 修改对象 + public void updateHello(@RestParam(name = "bean") HelloEntity entity) { //通过 /hello/update?bean={...} 修改对象 entity.setUpdatetime(System.currentTimeMillis()); source.update(entity); } //查询列表 @RestMapping(name = "query", auth = false) - public Sheet queryHello(@RestParam("bean") HelloBean bean, Flipper flipper) { //通过 /hello/query/offset:0/limit:20?bean={...} 查询列表 + public Sheet queryHello(@RestParam(name = "bean") HelloBean bean, Flipper flipper) { //通过 /hello/query/offset:0/limit:20?bean={...} 查询列表 return source.querySheet(HelloEntity.class, flipper, bean); } //查询单个 @RestMapping(name = "find", auth = false) - public HelloEntity findHello(@RestParam("#") int id) { //通过 /hello/find/1234 查询对象 + public HelloEntity findHello(@RestParam(name = "#") int id) { //通过 /hello/find/1234 查询对象 return source.find(HelloEntity.class, id); } }