You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by zh...@apache.org on 2022/06/12 07:22:16 UTC
[incubator-shenyu] branch master updated: Add alibaba dubbo http (#3538)
This is an automated email from the ASF dual-hosted git repository.
zhangzicheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 068a27941 Add alibaba dubbo http (#3538)
068a27941 is described below
commit 068a27941e46b1d4a917f68210186820b58126c5
Author: renzhuyan <40...@qq.com>
AuthorDate: Sun Jun 12 02:22:12 2022 -0500
Add alibaba dubbo http (#3538)
---
.../src/main/http/apache-dubbo-class-test-api.http | 191 +++++++++++++++++++++
.../src/main/http/apache-dubbo-test-api.http | 187 ++++++++++++++++++++
.../impl/DubboMultiParamServiceImpl.java | 1 -
.../annotation/impl/DubboTestServiceImpl.java | 1 -
.../src/main/http/apache-dubbo-class-test-api.http | 191 +++++++++++++++++++++
.../src/main/http/apache-dubbo-test-api.http | 187 ++++++++++++++++++++
6 files changed, 756 insertions(+), 2 deletions(-)
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-class-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-class-test-api.http
new file mode 100644
index 000000000..0236a6258
--- /dev/null
+++ b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-class-test-api.http
@@ -0,0 +1,191 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+### shengyu getway proxy orderSave
+POST http://localhost:9195/dubbo/demo/findById
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123"
+}
+
+### shengyu getway proxy findAll
+GET http://localhost:9195/dubbo/demo/findAll
+Accept: application/json
+
+
+### shengyu getway proxy insert
+POST http://localhost:9195/dubbo/demo/insert
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy findList
+GET http://localhost:9195/dubbo/demo/findList
+Accept: application/json
+
+### shengyu getway proxy findByIdsAndName
+GET http://localhost:9195/dubbo/demo/findByIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByArrayIdsAndName
+GET http://localhost:9195/dubbo/demo/findByArrayIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByStringArray
+GET http://localhost:9195/dubbo/demo/findByStringArray
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ "123",
+ "124",
+ "125"
+ ]
+}
+
+### shengyu getway proxy findByListId
+GET http://localhost:9195/dubbo/demo/findByListId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ]
+}
+
+### shengyu getway proxy batchSave
+PUT http://localhost:9195/dubbo/demo/batchSave
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ]
+}
+
+### shengyu getway proxy batchSaveAndNameAndId
+PUT http://localhost:9195/dubbo/demo/batchSaveAndNameAndId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ],
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy saveComplexBeanTest
+PUT http://localhost:9195/dubbo/demo/saveComplexBeanTest
+Accept: application/json
+Content-Type: application/json
+
+{
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+}
+
+### shengyu getway proxy saveComplexBeanTestAndName
+PUT http://localhost:9195/dubbo/demo/saveComplexBeanTestAndName
+Accept: application/json
+Content-Type: application/json
+
+## The order of the parameters is important
+{
+ "complexBeanTest": {
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+ },
+ "name": "name"
+}
+
+
+
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-test-api.http
new file mode 100644
index 000000000..afe37b62e
--- /dev/null
+++ b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-test-api.http
@@ -0,0 +1,187 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+### shengyu getway proxy orderSave
+POST http://localhost:9195/dubbo/findById
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123"
+}
+
+### shengyu getway proxy findAll
+GET http://localhost:9195/dubbo/findAll
+Accept: application/json
+
+
+### shengyu getway proxy insert
+POST http://localhost:9195/dubbo/insert
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy findByIdsAndName
+GET http://localhost:9195/dubbo/findByIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByArrayIdsAndName
+GET http://localhost:9195/dubbo/findByArrayIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByStringArray
+GET http://localhost:9195/dubbo/findByStringArray
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ "123",
+ "124",
+ "125"
+ ]
+}
+
+### shengyu getway proxy findByListId
+GET http://localhost:9195/dubbo/findByListId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ]
+}
+
+### shengyu getway proxy batchSave
+PUT http://localhost:9195/dubbo/batchSave
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ]
+}
+
+### shengyu getway proxy batchSaveAndNameAndId
+PUT http://localhost:9195/dubbo/batchSaveAndNameAndId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ],
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy saveComplexBeanTest
+PUT http://localhost:9195/dubbo/saveComplexBeanTest
+Accept: application/json
+Content-Type: application/json
+
+{
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+}
+
+### shengyu getway proxy saveComplexBeanTestAndName
+PUT http://localhost:9195/dubbo/saveComplexBeanTestAndName
+Accept: application/json
+Content-Type: application/json
+
+## The order of the parameters is important
+{
+ "complexBeanTest": {
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+ },
+ "name": "name"
+}
+
+
+
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java
index d95cf5d3b..b90076137 100644
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java
+++ b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java
@@ -32,7 +32,6 @@ import java.util.stream.Collectors;
* The type Dubbo multi param service.
*/
@Service
-@ShenyuDubboClient("/demo")
public class DubboMultiParamServiceImpl implements DubboMultiParamService {
@Override
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java
index dd1f4f10b..2b5690e40 100644
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java
+++ b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java
@@ -29,7 +29,6 @@ import java.util.Random;
* The type Dubbo service.
*/
@Service
-@ShenyuDubboClient("/demo")
public class DubboTestServiceImpl implements DubboTestService {
@Override
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-class-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-class-test-api.http
new file mode 100644
index 000000000..0236a6258
--- /dev/null
+++ b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-class-test-api.http
@@ -0,0 +1,191 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+### shengyu getway proxy orderSave
+POST http://localhost:9195/dubbo/demo/findById
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123"
+}
+
+### shengyu getway proxy findAll
+GET http://localhost:9195/dubbo/demo/findAll
+Accept: application/json
+
+
+### shengyu getway proxy insert
+POST http://localhost:9195/dubbo/demo/insert
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy findList
+GET http://localhost:9195/dubbo/demo/findList
+Accept: application/json
+
+### shengyu getway proxy findByIdsAndName
+GET http://localhost:9195/dubbo/demo/findByIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByArrayIdsAndName
+GET http://localhost:9195/dubbo/demo/findByArrayIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByStringArray
+GET http://localhost:9195/dubbo/demo/findByStringArray
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ "123",
+ "124",
+ "125"
+ ]
+}
+
+### shengyu getway proxy findByListId
+GET http://localhost:9195/dubbo/demo/findByListId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ]
+}
+
+### shengyu getway proxy batchSave
+PUT http://localhost:9195/dubbo/demo/batchSave
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ]
+}
+
+### shengyu getway proxy batchSaveAndNameAndId
+PUT http://localhost:9195/dubbo/demo/batchSaveAndNameAndId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ],
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy saveComplexBeanTest
+PUT http://localhost:9195/dubbo/demo/saveComplexBeanTest
+Accept: application/json
+Content-Type: application/json
+
+{
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+}
+
+### shengyu getway proxy saveComplexBeanTestAndName
+PUT http://localhost:9195/dubbo/demo/saveComplexBeanTestAndName
+Accept: application/json
+Content-Type: application/json
+
+## The order of the parameters is important
+{
+ "complexBeanTest": {
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+ },
+ "name": "name"
+}
+
+
+
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-test-api.http
new file mode 100644
index 000000000..afe37b62e
--- /dev/null
+++ b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-test-api.http
@@ -0,0 +1,187 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+### shengyu getway proxy orderSave
+POST http://localhost:9195/dubbo/findById
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123"
+}
+
+### shengyu getway proxy findAll
+GET http://localhost:9195/dubbo/findAll
+Accept: application/json
+
+
+### shengyu getway proxy insert
+POST http://localhost:9195/dubbo/insert
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy findByIdsAndName
+GET http://localhost:9195/dubbo/findByIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByArrayIdsAndName
+GET http://localhost:9195/dubbo/findByArrayIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByStringArray
+GET http://localhost:9195/dubbo/findByStringArray
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ "123",
+ "124",
+ "125"
+ ]
+}
+
+### shengyu getway proxy findByListId
+GET http://localhost:9195/dubbo/findByListId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ]
+}
+
+### shengyu getway proxy batchSave
+PUT http://localhost:9195/dubbo/batchSave
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ]
+}
+
+### shengyu getway proxy batchSaveAndNameAndId
+PUT http://localhost:9195/dubbo/batchSaveAndNameAndId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ],
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy saveComplexBeanTest
+PUT http://localhost:9195/dubbo/saveComplexBeanTest
+Accept: application/json
+Content-Type: application/json
+
+{
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+}
+
+### shengyu getway proxy saveComplexBeanTestAndName
+PUT http://localhost:9195/dubbo/saveComplexBeanTestAndName
+Accept: application/json
+Content-Type: application/json
+
+## The order of the parameters is important
+{
+ "complexBeanTest": {
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+ },
+ "name": "name"
+}
+
+
+