From bf49c68286682da4546449f06fe3bc8e841334c9 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 25 Jul 2019 14:05:31 +0800 Subject: [PATCH] 1.13.1 --- changelog.md | 1 + .../sop/storyweb/controller/TraditionalWebappController.java | 4 ++-- .../src/main/java/com/gitee/sop/sdk/client/OpenRequest.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index bb3892eb..681d86b1 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ ## 1.13.1 - 支持json方式请求(application/json) +- 支持传统web服务开发(见文档`传统web开发`) ## 1.13.0 diff --git a/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/TraditionalWebappController.java b/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/TraditionalWebappController.java index 08ac2066..a2ede01a 100644 --- a/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/TraditionalWebappController.java +++ b/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/TraditionalWebappController.java @@ -44,8 +44,8 @@ public class TraditionalWebappController { return food; } - // http://localhost:8081/rest/food/get/getFoodByObj?id=2 - @ApiMapping(value = "/get/getFoodByObj", method = RequestMethod.GET) + // http://localhost:8081/rest/food/getFoodByObj?id=2 + @ApiMapping(value = "ggetFoodByObj", method = RequestMethod.GET) public Food getFoodByObj(Food food) { return food; } diff --git a/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/client/OpenRequest.java b/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/client/OpenRequest.java index 8c4fe67b..4ce3b2b3 100644 --- a/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/client/OpenRequest.java +++ b/sop-sdk/sdk-java/src/main/java/com/gitee/sop/sdk/client/OpenRequest.java @@ -42,7 +42,7 @@ public class OpenRequest { } return openHttp.get(url, header); } else { - return openHttp.requestJson(url, JSON.toJSONString(form), header); + return openHttp.request(url, form, header, requestMethod.name()); } } } catch (IOException e) {