This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 2304d3611 Task(shenyu-examples-sdk-springcloud) (#3925) (#4218)
2304d3611 is described below

commit 2304d36115f7f4dbd6988b8cfe50f1254c821aff
Author: 杨文杰 <[email protected]>
AuthorDate: Mon Nov 28 14:47:29 2022 +0800

    Task(shenyu-examples-sdk-springcloud) (#3925) (#4218)
    
    * feat(shenyu-examples-sdk-springcloud): add shenyu-examples-sdk-springcloud
    
    * feat(shenyu-examples-sdk-springcloud): add shenyu-examples-sdk-springcloud
    
    * feat(shenyu-examples-sdk-springcloud): add shenyu-examples-sdk-springcloud
---
 shenyu-examples/shenyu-examples-sdk/pom.xml        |   1 +
 .../shenyu-examples-sdk-springcloud/pom.xml        |  36 +++++
 .../Dockerfile                                     |  29 ++++
 .../pom.xml                                        | 164 +++++++++++++++++++++
 .../src/main/http/sdk-spring-cloud-test-api.http   |  52 +++++++
 ...yuSdkSpringCloudConsumerExampleApplication.java |  37 +++++
 .../consumer/api/ShenyuSpringCloudClientApi.java   |  68 +++++++++
 .../ShenyuSdkSpringCloudConsumerController.java    |  81 ++++++++++
 .../sdk/springcloud/consumer/dto/OrderDTO.java     |  78 ++++++++++
 .../src/main/resources/application.yaml            |  60 ++++++++
 .../Dockerfile                                     |  29 ++++
 .../pom.xml                                        | 101 +++++++++++++
 .../ShenyuSdkSpringCloudProviderApplication.java   |  39 +++++
 .../src/main/resources/application.yml             |  64 ++++++++
 14 files changed, 839 insertions(+)

diff --git a/shenyu-examples/shenyu-examples-sdk/pom.xml 
b/shenyu-examples/shenyu-examples-sdk/pom.xml
index e67c5d42f..7f21218a6 100644
--- a/shenyu-examples/shenyu-examples-sdk/pom.xml
+++ b/shenyu-examples/shenyu-examples-sdk/pom.xml
@@ -30,6 +30,7 @@
     <modules>
         <module>shenyu-examples-sdk-http</module>
         <module>shenyu-examples-sdk-dubbo</module>
+        <module>shenyu-examples-sdk-springcloud</module>
     </modules>
 
     <properties>
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/pom.xml 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/pom.xml
new file mode 100644
index 000000000..d6d95e64a
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <artifactId>shenyu-examples-sdk</artifactId>
+        <groupId>org.apache.shenyu</groupId>
+        <version>2.5.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>shenyu-examples-sdk-springcloud</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>shenyu-examples-sdk-springcloud-provider</module>
+        <module>shenyu-examples-sdk-springcloud-consumer</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
new file mode 100644
index 000000000..de486f41e
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
@@ -0,0 +1,29 @@
+# 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.
+
+FROM openjdk:8-jre-alpine
+
+ENV APP_NAME shenyu-examples-sdk-springcloud-consumer
+ENV LOCAL_PATH /opt/${APP_NAME}
+
+RUN mkdir -p ${LOCAL_PATH}
+
+ADD target/${APP_NAME}.jar ${LOCAL_PATH}
+
+WORKDIR ${LOCAL_PATH}
+EXPOSE 8899
+
+CMD java -jar ${APP_NAME}.jar
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/pom.xml
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/pom.xml
new file mode 100644
index 000000000..200a40b1b
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/pom.xml
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <artifactId>shenyu-examples-sdk-springcloud</artifactId>
+        <groupId>org.apache.shenyu</groupId>
+        <version>2.5.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>shenyu-examples-sdk-springcloud-consumer</artifactId>
+
+    <properties>
+        <spring-cloud.version>3.1.2</spring-cloud.version>
+        <nacos-discovery.version>2021.0.1.0</nacos-discovery.version>
+        <eureka-client.version>3.1.2</eureka-client.version>
+    </properties>
+
+    <dependencies>
+
+        <!--spring bootstrap-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>javax.servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-commons</artifactId>
+            <version>${spring-cloud.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.projectlombok</groupId>
+                    <artifactId>lombok</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-examples-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+        <!--shenyu sdk-->
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-spring-boot-starter-sdk</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-sdk-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-register-instance-eureka</artifactId>
+            <version>2.5.1-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>servlet-api</artifactId>
+                    <groupId>javax.servlet</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-sdk-httpclient</artifactId>
+        </dependency>
+
+
+    </dependencies>
+
+    <build>
+        <finalName>shenyu-examples-sdk-springcloud-consumer</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    
<mainClass>org.apache.shenyu.examples.sdk.springcloud.consumer.ShenyuSdkSpringCloudConsumerExampleApplication</mainClass>
+                    <executable>true</executable>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>example</id>
+            <properties>
+                
<docker.buildArg.APP_NAME>shenyu-examples-sdk-springcloud-consumer</docker.buildArg.APP_NAME>
+                
<docker.image.tag.repo>shenyu-examples-sdk-springcloud-consumer</docker.image.tag.repo>
+                <docker.image.tag.tagName>latest</docker.image.tag.tagName>
+            </properties>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>${docker-maven-plugin.version}</version>
+                        <configuration>
+                            <images>
+                                <image>
+                                    
<name>shenyu-examples-sdk-springcloud-consumer</name>
+                                    <build>
+                                        
<contextDir>${project.basedir}</contextDir>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>start</id>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/http/sdk-spring-cloud-test-api.http
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/http/sdk-spring-cloud-test-api.http
new file mode 100644
index 000000000..a8b901adf
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/http/sdk-spring-cloud-test-api.http
@@ -0,0 +1,52 @@
+#
+# 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:8899/save
+Accept: application/json
+Content-Type: application/json
+
+{
+  "id": 123,
+  "name": "order"
+}
+
+
+### shengyu getway proxy orderSave
+GET http://localhost:8899/findById?id=123
+Accept: application/json
+Content-Type: application/json
+
+### shengyu getway proxy path
+GET http://localhost:8899/path/123/hahah
+Accept: application/json
+Content-Type: application/json
+
+### shengyu getway proxy path
+GET http://localhost:8899/path/123/name
+Accept: application/json
+Content-Type: application/json
+
+
+
+--WebAppBoundary
+Content-Disposition: form-data; name="file"; filename="1.txt";
+Content-Type: multipart/form-data
+
+< ../../../../shenyu-examples-common/src/main/resources/1.txt
+--WebAppBoundary--
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/ShenyuSdkSpringCloudConsumerExampleApplication.java
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/ShenyuSdkSpringCloudConsumerExampleApplication.java
new file mode 100644
index 000000000..de8163739
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/ShenyuSdkSpringCloudConsumerExampleApplication.java
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package org.apache.shenyu.examples.sdk.springcloud.consumer;
+
+import org.apache.shenyu.sdk.spring.EnableShenyuClients;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableShenyuClients(basePackages = 
"org.apache.shenyu.examples.sdk.springcloud.consumer.api")
+public class ShenyuSdkSpringCloudConsumerExampleApplication {
+
+    /**
+     * main.
+     *
+     * @param args args
+     */
+    public static void main(final String[] args) {
+        
SpringApplication.run(ShenyuSdkSpringCloudConsumerExampleApplication.class, 
args);
+    }
+
+}
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/api/ShenyuSpringCloudClientApi.java
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/api/ShenyuSpringCloudClientApi.java
new file mode 100644
index 000000000..3d65f3fd8
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/api/ShenyuSpringCloudClientApi.java
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+package org.apache.shenyu.examples.sdk.springcloud.consumer.api;
+
+import org.apache.shenyu.examples.sdk.springcloud.consumer.dto.OrderDTO;
+import org.apache.shenyu.sdk.spring.ShenyuClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@ShenyuClient(contextId = "SHENYU-BOOTSTRAP", name = 
"ShenyuSpringCloudClientApi")
+public interface ShenyuSpringCloudClientApi {
+
+    /**
+     * save.
+     *
+     * @param orderDTO OrderDTO
+     * @return OrderDTO
+     */
+    @PostMapping("/springcloud/order/save")
+    OrderDTO save(@RequestBody OrderDTO orderDTO);
+
+    /**
+     * Find by id order dto.
+     *
+     * @param id the id
+     * @return the order dto
+     */
+    @GetMapping("/springcloud/order/findById")
+    OrderDTO findById(@RequestParam("id") String id);
+
+    /**
+     * Gets path variable.
+     *
+     * @param id   the id
+     * @param name the name
+     * @return the path variable
+     */
+    @GetMapping("/springcloud/order/path/{id}/{name}")
+    OrderDTO getPathVariable(@PathVariable("id") String id, 
@PathVariable("name") String name);
+
+    /**
+     * Test rest ful order dto.
+     *
+     * @param id the id
+     * @return the order dto
+     */
+    @GetMapping("/springcloud/order/path/{id}/name")
+    OrderDTO testRestFul(@PathVariable("id") String id);
+
+}
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/controller/ShenyuSdkSpringCloudConsumerController.java
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/controller/ShenyuSdkSpringCloudConsumerController.java
new file mode 100644
index 000000000..95966d7a8
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/controller/ShenyuSdkSpringCloudConsumerController.java
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+package org.apache.shenyu.examples.sdk.springcloud.consumer.controller;
+
+import 
org.apache.shenyu.examples.sdk.springcloud.consumer.api.ShenyuSpringCloudClientApi;
+import org.apache.shenyu.examples.sdk.springcloud.consumer.dto.OrderDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class ShenyuSdkSpringCloudConsumerController {
+
+    @Autowired
+    private ShenyuSpringCloudClientApi clientApi;
+
+    /**
+     * save.
+     *
+     * @param orderDTO orderDto
+     * @return OrderDTO
+     */
+    @PostMapping("/save")
+    public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
+        return clientApi.save(orderDTO);
+    }
+
+    /**
+     * findById.
+     *
+     * @param id id
+     * @return OrderDTO
+     */
+    @GetMapping("/findById")
+    OrderDTO findById(@RequestParam("id") final String id) {
+        return clientApi.findById(id);
+    }
+
+    /**
+     * getPathVariable.
+     *
+     * @param id   id
+     * @param name name
+     * @return OrderDTO
+     */
+    @GetMapping("/path/{id}/{name}")
+    OrderDTO getPathVariable(@PathVariable("id") final String id, 
@PathVariable("name") final String name) {
+        return clientApi.getPathVariable(id, name);
+    }
+
+    /**
+     * testRestFul.
+     *
+     * @param id id
+     * @return OrderDTO
+     */
+    @GetMapping("/path/{id}/name")
+    OrderDTO testRestFul(@PathVariable("id") final String id) {
+        return clientApi.testRestFul(id);
+    }
+
+}
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/dto/OrderDTO.java
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/dto/OrderDTO.java
new file mode 100644
index 000000000..54886d173
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/java/org/apache/shenyu/examples/sdk/springcloud/consumer/dto/OrderDTO.java
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+package org.apache.shenyu.examples.sdk.springcloud.consumer.dto;
+
+import java.io.Serializable;
+import java.util.StringJoiner;
+
+/**
+ * The type Order dto.
+ */
+public class OrderDTO implements Serializable {
+
+    private static final long serialVersionUID = 852118216655025857L;
+
+    private String id;
+
+    private String name;
+
+    /**
+     * Get id.
+     *
+     * @return id
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Set id.
+     *
+     * @param id id
+     */
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+    /**
+     * Get name.
+     *
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Set name.
+     *
+     * @param name name
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return new StringJoiner(", ", OrderDTO.class.getSimpleName() + "[", 
"]")
+                .add("id='" + id + "'")
+                .add("name='" + name + "'")
+                .toString();
+    }
+
+}
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/resources/application.yaml
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/resources/application.yaml
new file mode 100644
index 000000000..7837db1b1
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/src/main/resources/application.yaml
@@ -0,0 +1,60 @@
+# 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.
+server:
+  port: 8899
+  address: 0.0.0.0
+  tomcat:
+    max-http-form-post-size: 100MB
+
+shenyu:
+  register:
+    registerType: http #zookeeper #etcd #nacos #consul
+    serverLists: http://localhost:9095 #localhost:2181 #http://localhost:2379 
#localhost:8848
+    props:
+      username: admin
+      password: 123456
+  client:
+    http:
+      props:
+        contextPath: /http
+        appName: http
+  #          port: 8189
+  sdk:
+    enabled: true
+    register-type: eureka #local #etcd #nacos #consul
+    server-lists: http://localhost:8761/eureka/ #http://localhost:9095 
#http://localhost:2379 #localhost:8848
+
+spring:
+  servlet:
+    multipart:
+      max-file-size: 100MB
+      max-request-size: 100MB
+
+eureka:
+  client:
+    enabled: true
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+  instance:
+    prefer-ip-address: true
+
+logging:
+  level:
+    root: info
+    org.springframework.boot: info
+    org.apache.ibatis: info
+    org.apache.shenyu.test.bonuspoint: info
+    org.apache.shenyu.test.lottery: debug
+    org.apache.shenyu.test: debug
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
new file mode 100644
index 000000000..a33f0d668
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
@@ -0,0 +1,29 @@
+# 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.
+
+FROM openjdk:8-jre-alpine
+
+ENV APP_NAME shenyu-examples-sdk-springcloud-provider
+ENV LOCAL_PATH /opt/${APP_NAME}
+
+RUN mkdir -p ${LOCAL_PATH}
+
+ADD target/${APP_NAME}.jar ${LOCAL_PATH}
+
+WORKDIR ${LOCAL_PATH}
+EXPOSE 8761
+
+CMD java -jar ${APP_NAME}.jar
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/pom.xml
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/pom.xml
new file mode 100644
index 000000000..735edb0a3
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/pom.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <artifactId>shenyu-examples-sdk-springcloud</artifactId>
+        <groupId>org.apache.shenyu</groupId>
+        <version>2.5.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>shenyu-examples-sdk-springcloud-provider</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-examples-springcloud</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>shenyu-examples-sdk-springcloud-provider</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>
+                        
org.apache.shenyu.examples.sdk.springcloud.provider.ShenyuSdkSpringCloudProviderApplication
+                    </mainClass>
+                    <executable>true</executable>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>example</id>
+            <properties>
+                
<docker.buildArg.APP_NAME>shenyu-examples-sdk-springcloud-provider</docker.buildArg.APP_NAME>
+                
<docker.image.tag.repo>shenyu-examples-sdk-springcloud-provider</docker.image.tag.repo>
+                <docker.image.tag.tagName>latest</docker.image.tag.tagName>
+            </properties>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>${docker-maven-plugin.version}</version>
+                        <configuration>
+                            <images>
+                                <image>
+                                    
<name>shenyu-examples-sdk-springcloud-provider</name>
+                                    <build>
+                                        
<contextDir>${project.basedir}</contextDir>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>start</id>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/src/main/java/org/apache/shenyu/examples/sdk/springcloud/provider/ShenyuSdkSpringCloudProviderApplication.java
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/src/main/java/org/apache/shenyu/examples/sdk/springcloud/provider/ShenyuSdkSpringCloudProviderApplication.java
new file mode 100644
index 000000000..9686eaca4
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/src/main/java/org/apache/shenyu/examples/sdk/springcloud/provider/ShenyuSdkSpringCloudProviderApplication.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+package org.apache.shenyu.examples.sdk.springcloud.provider;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+
+/**
+ * Please see the shenyu-examples-springcloud for the detailed information.
+ */
+@SpringBootApplication(scanBasePackages = {"org.apache.shenyu.examples.*"})
+@EnableDiscoveryClient
+public class ShenyuSdkSpringCloudProviderApplication {
+
+    /**
+     * main.
+     *
+     * @param args args
+     */
+    public static void main(final String[] args) {
+        SpringApplication.run(ShenyuSdkSpringCloudProviderApplication.class, 
args);
+    }
+}
diff --git 
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/src/main/resources/application.yml
 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/src/main/resources/application.yml
new file mode 100644
index 000000000..dc10e6c23
--- /dev/null
+++ 
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/src/main/resources/application.yml
@@ -0,0 +1,64 @@
+# 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.
+
+server:
+  port: 8884
+  address: 0.0.0.0
+
+spring:
+  application:
+    name: springCloud-test
+  cloud:
+    loadbalancer:
+      ribbon:
+        enabled: true
+    discovery:
+      enabled: true
+    nacos:
+      discovery:
+        server-addr: 127.0.0.1:8848 # Spring Cloud Alibaba Dubbo use this.
+        enabled: false
+        namespace: ShenyuRegisterCenter
+
+eureka:
+  client:
+    enabled: true
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+  instance:
+    prefer-ip-address: true
+
+
+springCloud-test:
+  ribbon.NFLoadBalancerRuleClassName: com.netflix.loadbalancer.RandomRule
+
+shenyu:
+  register:
+    registerType: http #zookeeper #etcd #nacos #consul
+    serverLists: http://localhost:9095 #localhost:2181 #http://localhost:2379 
#localhost:8848
+    props:
+      username: admin
+      password: 123456
+  client:
+    springCloud:
+      props:
+        contextPath: /springcloud
+        addPrefixed: false
+#        port: 8884
+
+logging:
+  level:
+    root: info
+    org.apache.shenyu: debug


Reply via email to