diff --git a/2-advanced/dubbo-samples-cloud-native/README.md b/2-advanced/dubbo-samples-cloud-native/README.md
deleted file mode 100644
index 6f07c02371..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Showcasing smooth upgrading of Dubbo3
-
-## Start Dubbo3 Provider
-
-Test both interface-level and application-level are registered successfully and are ready for subscription.
-
-## Start Dubbo2 Consumer
-
-Test Dubbo2 Consumer using version 2.7.15 can find interface-level addresses provided by Dubbo3 provider.
-
-## Start Dubbo3 Consumer
-
-Test Dubbo3 Consumer can find application-level addresses provided by Dubbo3 provider.
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/pom.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/pom.xml
deleted file mode 100644
index 4e907bc709..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- 4.0.0
-
- org.apache.dubbo
- dubbo-call-sc
- 1.0-SNAPSHOT
- ../pom.xml
-
- dubbo-sc-api
- jar
- Dubbo Sc Api
- The demo module of dubbo project
-
- true
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/User.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/User.java
deleted file mode 100644
index 638704963d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/User.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * 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.dubbo.samples.microservices.sc.rest;
-
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class User implements Serializable {
-
- @NotNull
- @Min(1L)
- private Long id;
-
- @NotNull
- @Size(min = 6, max = 50)
- private String name;
-
- public User() {
- }
-
- public User(Long id, String name) {
- this.id = id;
- this.name = name;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return "User (" +
- "id=" + id +
- ", name='" + name + '\'' +
- ')';
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserService.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserService.java
deleted file mode 100644
index 06dcb2c93a..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * 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.dubbo.samples.microservices.sc.rest;
-
-
-import org.apache.dubbo.rpc.protocol.rest.support.ContentType;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-@Path("users")
-@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
-@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
-@Api(value = "UserService")
-public interface UserService {
-
- @GET
- @Path("{id : \\d+}")
- @ApiOperation(value = "getUser")
- User getUser(@ApiParam(value = "id") @PathParam("id") Long id);
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/spring/dubbo-consumer.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/spring/dubbo-consumer.xml
deleted file mode 100644
index 3f974e2054..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/spring/dubbo-consumer.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
deleted file mode 100644
index c0748e8b60..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed 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.dubbo.sc;
-
-import org.apache.dubbo.samples.microservices.sc.rest.User;
-import org.apache.dubbo.samples.microservices.sc.rest.UserService;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = "classpath*:spring/dubbo-consumer.xml")
-public class DubboSCIT {
-
- @Autowired
- private UserService userService;
-
- @Test
- public void test() {
- User user = userService.getUser(1L);
- System.out.println("result: " + user);
- Assert.assertEquals("username-1", user.getName());
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java
deleted file mode 100644
index 60b81750fd..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class MeController {
-
- private String instanceId;
-
- @Autowired
- public MeController(@Value("${spring.cloud.consul.discovery.instance-id:${random.value}}") String instanceId) {
- this.instanceId = instanceId;
- }
-
- @GetMapping("/me")
- public String me() {
- return instanceId;
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java
deleted file mode 100644
index a9620865d5..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RefreshScope
-@RestController
-@RequestMapping("/property")
-public class PropertyController {
-
- @Value("${applicationProp:default value}")
- private String applicationProperty;
-
- @Value("${property:default value}")
- private String property;
-
- @Value("${property2:default value}")
- private String property2;
-
- @Value("${infrastructureDesc:default value}")
- private String infrastructureDesc;
-
- @Value("${infrastructureUserName:default value}")
- private String infrastructureUserName;
-
- @Value("${infrastructurePassword:default value}")
- private String infrastructurePassword;
-
- @Value("${password:mypassword}")
- private String secret;
-
- @RequestMapping
- public String getProperty() {
- return "
applicationProperty:
" + applicationProperty + ""
- + "
property:
" + property + ""
- + "
property2:
" + property2 + ""
- + "
infrastructureDesc:
" + infrastructureDesc + ""
- + "
infrastructureUserName:
" + infrastructureUserName + ""
- + "
infrastructurePassword:
" + infrastructurePassword + ""
- + "
vault password:
" + secret + "";
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java
deleted file mode 100644
index 79fa9931a4..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.apache.dubbo.samples.microservices.sc.feign.TestFeign;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.client.RestTemplate;
-
-@RestController
-@RequestMapping("/users")
-//@RequestMapping("/ping")
-public class TestController {
-
- @Value("${spring.application.name}")
- private String appName;
-
- private final RestTemplate restTemplate;
- private final TestFeign testFeign;
-
- public TestController(RestTemplate restTemplate,
- TestFeign testFeign) {
- this.restTemplate = restTemplate;
- this.testFeign = testFeign;
- }
-
- @RequestMapping("{id}")
- public User getUser(@PathVariable("id") Long id) {
- return new User(id, "username-" + id);
- }
-
-
- @RequestMapping
- public String doAlive() {
- return "Alive!";
- }
-
- @RequestMapping("/rest")
- public String doRestAlive() {
- return new RestTemplate().getForObject("http://localhost:8099/ping", String.class);
- }
-
- @RequestMapping("/rest/ribbon")
- public String doRestAliveUsingEurekaAndRibbon() {
- String url = "http://dubbo-provider-demo/users/1";
- System.out.println("url: "+url);
- return restTemplate.getForObject(url, String.class);
- }
-
- @RequestMapping("/rest/feign")
- public String doRestAliveUsingFeign() {
- return testFeign.doAlive();
- }
-}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/resources/application.yml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/resources/application.yml
deleted file mode 100644
index 51e5b318a4..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/resources/application.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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.
-#
-management:
- security:
- enabled: false
-endpoints:
- shutdown:
- enabled: false
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/resources/bootstrap.yml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/resources/bootstrap.yml
deleted file mode 100644
index f89e3fe4e1..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/resources/bootstrap.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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: 8099
-
-spring:
- application:
- name: spring-cloud-provider-for-dubbo
- cloud:
- consul:
- host: ${consul.address:127.0.0.1}
- port: 8500
- enabled: true
- discovery:
- instance-id: ${spring.application.name}:${random.value}
- service-name: ${spring.application.name}
- heartbeat:
- enabled: true
- health-check-interval: 10s
- health-check-critical-timeout: 10s
- register-health-check: true
- config:
- format: yaml
- prefix: config
- defaultContext: application
- data-key: data
- profileSeparator: '-'
-
-management:
- security:
- enabled: false
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/README.md b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/README.md
deleted file mode 100644
index e42c3e7466..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Dubbo自动发现并消费原生Spring Cloud服务,以Consul为注册中心。
-
-* Spring MVC方式开发服务端
-* 以标准Dubbo方式开发客户端
- * 首先,定义标准JAX-RS注解的接口(与Provider端相对应)
- * Registry指定
- * 同时消费,要使用Multiple Registry策略
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/case-configuration.yml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/case-configuration.yml
deleted file mode 100644
index 3c8ac8c021..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/case-configuration.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# 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.
-
-ignoreFor: 'Interoperability between spring-cloud and dubbo is not ready?'
-
-services:
- zookeeper:
- image: zookeeper:latest
-
- consul-server:
- image: consul:latest
-
- dubbo-scdubbo-provider:
- type: app
- basedir: dubbo-scdubbo-provider
- mainClass: org.apache.dubbo.samples.microservices.sc.Application
- systemProps:
- - consul.address=consul-server
- waitPortsBeforeRun:
- - consul-server:8500
- checkPorts:
- - 8099
- checkLog: "dubbo service started"
- depends_on:
- - consul-server
-
- dubbo-scdubbo-provider2:
- type: app
- basedir: dubbo-scdubbo-provider2
- mainClass: org.apache.dubbo.demo.provider.Application
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- checkPorts:
- - 20880
- checkLog: "dubbo service started"
- depends_on:
- - zookeeper
-
- dubbo-scdubbo-consumer-test:
- type: test
- basedir: dubbo-scdubbo-consumer
- tests:
- - "**/*IT.class"
- systemProps:
- - consul.address=consul-server
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - consul-server:8500
- - zookeeper:2181
- - dubbo-scdubbo-provider:8099
- - dubbo-scdubbo-provider2:20880
- depends_on:
- - consul-server
- - dubbo-scdubbo-provider
- - dubbo-scdubbo-provider2
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/case-versions.conf b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/case-versions.conf
deleted file mode 100644
index 15802f7de6..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# 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.
-#
-
-
-# Supported component versions of the test case
-
-# SpringBoot/SpringCloud app
-dubbo.version=2.7*
-spring-boot.version=1.*
-java.version= [ <= 11]
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/pom.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/pom.xml
deleted file mode 100644
index 771e7e9b8d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- 4.0.0
-
- org.apache.dubbo
- dubbo-call-scdubbo
- 1.0-SNAPSHOT
- ../pom.xml
-
- dubbo-scdubbo-api
- jar
- Dubbo Scdubbo Api
- The demo module of dubbo project
-
- true
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/pom.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/pom.xml
deleted file mode 100644
index 581e3805c2..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/pom.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
- 4.0.0
-
- org.apache.dubbo
- dubbo-call-scdubbo
- 1.0-SNAPSHOT
- ../pom.xml
-
- dubbo-scdubbo-consumer
- jar
- Dubbo Scdubbo Consumer
- The demo consumer module of dubbo project
-
- true
-
-
-
- org.apache.dubbo
- dubbo-scdubbo-api
- ${project.parent.version}
-
-
- org.apache.dubbo
- dubbo-registry-multicast
-
-
- org.apache.dubbo
- dubbo-registry-nacos
-
-
- com.alibaba.nacos
- nacos-client
-
-
- org.apache.dubbo
- dubbo-registry-zookeeper
-
-
- org.apache.dubbo
- dubbo-configcenter-zookeeper
-
-
- org.apache.dubbo
- dubbo-configcenter-nacos
-
-
- org.apache.dubbo
- dubbo-configcenter-consul
-
-
- org.apache.dubbo
- dubbo-metadata-report-nacos
-
-
- org.apache.dubbo
- dubbo-config-spring
-
-
- org.apache.dubbo
- dubbo-rpc-dubbo
-
-
- org.apache.dubbo
- dubbo-rpc-rest
-
-
- org.apache.dubbo
- dubbo-remoting-netty4
-
-
- org.apache.dubbo
- dubbo-serialization-hessian2
-
-
- org.apache.dubbo
- dubbo-registry-consul
-
-
-
- junit
- junit
- ${junit.version}
-
-
- org.springframework
- spring-test
- test
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot-maven-plugin.version}
-
-
-
- repackage
-
-
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
deleted file mode 100644
index 5b2d932912..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.dubbo.demo.consumer;
-
-import org.apache.dubbo.demo.DemoService;
-import org.apache.dubbo.samples.microservices.sc.rest.User;
-import org.apache.dubbo.samples.microservices.sc.rest.UserService;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class Application {
- public static void main(String[] args) {
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-consumer.xml");
- context.start();
-
- UserService userService = context.getBean("userService", UserService.class);
- User user = userService.getUser(1L);
- System.out.println("result: " + user);
-
- DemoService demoService = context.getBean("demoService", DemoService.class);
- String hello = demoService.sayHello("world");
- System.out.println("result: " + hello);
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/User.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/User.java
deleted file mode 100644
index 638704963d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/User.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * 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.dubbo.samples.microservices.sc.rest;
-
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class User implements Serializable {
-
- @NotNull
- @Min(1L)
- private Long id;
-
- @NotNull
- @Size(min = 6, max = 50)
- private String name;
-
- public User() {
- }
-
- public User(Long id, String name) {
- this.id = id;
- this.name = name;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return "User (" +
- "id=" + id +
- ", name='" + name + '\'' +
- ')';
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserService.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserService.java
deleted file mode 100644
index 06dcb2c93a..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * 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.dubbo.samples.microservices.sc.rest;
-
-
-import org.apache.dubbo.rpc.protocol.rest.support.ContentType;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-@Path("users")
-@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
-@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
-@Api(value = "UserService")
-public interface UserService {
-
- @GET
- @Path("{id : \\d+}")
- @ApiOperation(value = "getUser")
- User getUser(@ApiParam(value = "id") @PathParam("id") Long id);
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/spring/dubbo-consumer.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/spring/dubbo-consumer.xml
deleted file mode 100644
index d139a7aab2..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/spring/dubbo-consumer.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/pom.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/pom.xml
deleted file mode 100644
index 67910776ff..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/pom.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
- 4.0.0
-
- org.apache.dubbo
- dubbo-call-scdubbo
- 1.0-SNAPSHOT
- ../pom.xml
-
-
- dubbo-scdubbo-provider
- Dubbo Scdubbo Provider
- Dubbo Scdubbo Provider
-
-
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- ${spring-cloud-dependencies.version}
- pom
- import
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-context
-
-
- org.springframework.cloud
- spring-cloud-starter-feign
-
-
- org.springframework.cloud
- spring-cloud-starter-ribbon
-
-
- org.springframework.cloud
- spring-cloud-starter-consul-all
- ${spring-cloud-starter-consul.version}
-
-
-
- org.springframework.cloud
- spring-cloud-starter-consul-config
- ${spring-cloud-starter-consul.version}
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- ${spring-boot-starter-test.version}
- test
-
-
-
-
- 1.3.0.RELEASE
- 1.5.10.RELEASE
- Dalston.SR4
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot-maven-plugin.version}
-
-
-
- repackage
-
-
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java
deleted file mode 100644
index 35b011a19f..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.feign.EnableFeignClients;
-
-import java.util.concurrent.CountDownLatch;
-
-@SpringBootApplication
-@EnableDiscoveryClient
-@EnableFeignClients()
-public class Application {
- public static void main(String[] args) throws Exception {
- SpringApplication.run(Application.class, args);
-
- System.out.println("dubbo service started");
- new CountDownLatch(1).await();
- }
-}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
deleted file mode 100644
index 3414d24596..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.configuration;
-
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.client.RestTemplate;
-
-@Configuration
-public class RestTemplateConfiguration {
-
- @Bean
- @LoadBalanced
- RestTemplate loadBalancedRestTemplate() {
- return new RestTemplate();
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java
deleted file mode 100644
index 28abb6ae07..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class MeController {
-
- private String instanceId;
-
- @Autowired
- public MeController(@Value("${spring.cloud.consul.discovery.instance-id:${random.value}}") String instanceId) {
- this.instanceId = instanceId;
- }
-
- @GetMapping("/me")
- public String me() {
- return instanceId;
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java
deleted file mode 100644
index 56425362e4..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RefreshScope
-@RestController
-@RequestMapping("/property")
-public class PropertyController {
-
- @Value("${applicationProp:default value}")
- private String applicationProperty;
-
- @Value("${property:default value}")
- private String property;
-
- @Value("${property2:default value}")
- private String property2;
-
- @Value("${infrastructureDesc:default value}")
- private String infrastructureDesc;
-
- @Value("${infrastructureUserName:default value}")
- private String infrastructureUserName;
-
- @Value("${infrastructurePassword:default value}")
- private String infrastructurePassword;
-
- @Value("${password:mypassword}")
- private String secret;
-
- @RequestMapping
- public String getProperty() {
- return "
applicationProperty:
" + applicationProperty + ""
- + "
property:
" + property + ""
- + "
property2:
" + property2 + ""
- + "
infrastructureDesc:
" + infrastructureDesc + ""
- + "
infrastructureUserName:
" + infrastructureUserName + ""
- + "
infrastructurePassword:
" + infrastructurePassword + ""
- + "
vault password:
" + secret + "";
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java
deleted file mode 100644
index 05953e4097..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.apache.dubbo.samples.microservices.sc.feign.TestFeign;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.client.RestTemplate;
-
-@RestController
-@RequestMapping("/users")
-public class TestController {
-
- @Value("${spring.application.name}")
- private String appName;
-
- private final RestTemplate restTemplate;
- private final TestFeign testFeign;
-
- public TestController(RestTemplate restTemplate,
- TestFeign testFeign) {
- this.restTemplate = restTemplate;
- this.testFeign = testFeign;
- }
-
- @RequestMapping("{id}")
- public User getUser(@PathVariable("id") Long id) {
- return new User(id, "username-" + id);
- }
-
- @RequestMapping
- public String doAlive() {
- return "Alive!";
- }
-
- @RequestMapping("/rest")
- public String doRestAlive() {
- return new RestTemplate().getForObject("http://localhost:8099/ping", String.class);
- }
-
- @RequestMapping("/rest/ribbon")
- public String doRestAliveUsingEurekaAndRibbon() {
- String url = "http://dubbo-provider-demo/users/1";
- System.out.println("url: "+url);
- return restTemplate.getForObject(url, String.class);
- }
-
- @RequestMapping("/rest/feign")
- public String doRestAliveUsingFeign() {
- return testFeign.doAlive();
- }
-}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/resources/application.yml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/resources/application.yml
deleted file mode 100644
index 5e381f81ac..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/resources/application.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-
-management:
- security:
- enabled: false
-endpoints:
- shutdown:
- enabled: false
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/resources/bootstrap.yml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/resources/bootstrap.yml
deleted file mode 100644
index 7cec152fd8..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/resources/bootstrap.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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: 8099
-
-spring:
- application:
- name: scdubbo-provider
- cloud:
- consul:
- host: ${consul.address:127.0.0.1}
- port: 8500
- enabled: true
-
-management:
- security:
- enabled: false
-
- endpoint:
- consul:
- enabled: false
- health:
- consul:
- enabled: false
-
-endpoints:
- consul:
- enabled: false
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/pom.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/pom.xml
deleted file mode 100644
index 9503c223cc..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
- 4.0.0
-
- org.apache.dubbo
- dubbo-call-scdubbo
- 1.0-SNAPSHOT
- ../pom.xml
-
- dubbo-scdubbo-provider2
- jar
- Dubbo Scdubbo Provider2
- Dubbo Scdubbo Provider2
-
-
- true
- 1.7.25
-
-
-
-
- org.apache.dubbo
- dubbo-scdubbo-api
- ${project.parent.version}
-
-
- org.apache.dubbo
- dubbo-registry-multicast
-
-
- org.apache.dubbo
- dubbo-registry-nacos
-
-
- com.alibaba.nacos
- nacos-client
-
-
- org.apache.dubbo
- dubbo-registry-zookeeper
-
-
- org.apache.dubbo
- dubbo-configcenter-zookeeper
-
-
- org.apache.dubbo
- dubbo-configcenter-nacos
-
-
- org.apache.dubbo
- dubbo-metadata-report-nacos
-
-
- org.apache.dubbo
- dubbo-rpc-dubbo
-
-
- org.apache.dubbo
- dubbo-config-spring
-
-
- org.apache.dubbo
- dubbo-remoting-netty4
-
-
- org.apache.dubbo
- dubbo-serialization-hessian2
-
-
- org.slf4j
- slf4j-api
- 1.7.25
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-log4j12.version}
-
-
- log4j
- log4j
- 1.2.17
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot-maven-plugin.version}
-
-
-
- repackage
-
-
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/spring/dubbo-provider.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/spring/dubbo-provider.xml
deleted file mode 100644
index 5a03bc00b4..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/spring/dubbo-provider.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/pom.xml b/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/pom.xml
deleted file mode 100644
index cf4f0d8d52..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
- 4.0.0
- pom
- org.apache.dubbo
- dubbo-call-scdubbo
- 1.0-SNAPSHOT
- Dubbo Call Scdubbo
- Dubbo Call Scdubbo
-
-
- dubbo-scdubbo-api
- dubbo-scdubbo-provider
- dubbo-scdubbo-provider2
- dubbo-scdubbo-consumer
-
-
-
- true
- 2.6.4
- 1.8
- 1.8
- 3.7.0
- 2.7.13
- 4.13.1
- 1.5.13.RELEASE
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring-boot.version}
- pom
- import
-
-
- org.apache.dubbo
- dubbo-bom
- ${dubbo.version}
- pom
- import
-
-
- com.google.guava
- guava
- 32.0.0-jre
-
-
-
-
-
-
- apache.snapshots.https
- Apache Development Snapshot Repository
- https://repository.apache.org/content/repositories/snapshots
- default
-
- false
-
-
- true
- daily
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.7.0
-
-
- ${target.level}
-
-
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/GreetingService.java b/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
deleted file mode 100644
index 38c7a6072d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.dubbo.demo;
-
-/**
- *
- */
-public interface GreetingService {
- String hello();
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java b/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
deleted file mode 100644
index 7751896281..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.dubbo.demo.provider;
-
-import org.apache.dubbo.demo.DemoService;
-import org.apache.dubbo.rpc.RpcContext;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DemoServiceImpl implements DemoService {
- private static final Logger logger = LoggerFactory.getLogger(DemoServiceImpl.class);
-
- @Override
- public String sayHello(String name) {
- logger.info("Hello " + name + ", request from consumer: " + RpcContext.getContext().getRemoteAddress());
- return "Hello " + name;
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/src/main/java/org/apache/dubbo/demo/DemoService.java b/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/src/main/java/org/apache/dubbo/demo/DemoService.java
deleted file mode 100644
index 64672fa8fa..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/src/main/java/org/apache/dubbo/demo/DemoService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.dubbo.demo;
-
-public interface DemoService {
-
- String sayHello(String name);
-
-}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/pom.xml b/2-advanced/dubbo-samples-cloud-native/pom.xml
deleted file mode 100644
index c3a7002bc2..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- 4.0.0
- org.apache.dubbo
- 1.0-SNAPSHOT
- dubbo-samples-cloud-native
-
- pom
- Dubbo Samples Cloud Native
- The cloud native demo module of dubbo project
-
-
- dubbo-demo-servicediscovery-xml
- servicediscovery-transfer
- dubbo-call-sc
- dubbo-call-scdubbo
- sc-call-dubbo
- dubbo-servicediscovery-migration
-
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/pom.xml b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/pom.xml
deleted file mode 100644
index 26c38af677..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- 4.0.0
-
- org.apache.dubbo
- sc-call-dubbo
- 1.0-SNAPSHOT
- ../pom.xml
-
- sc-dubbo-api
- jar
- Sc Dubbo Api
- Sc Dubbo Api
-
- true
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/src/main/java/org/apache/dubbo/demo/DemoService.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/src/main/java/org/apache/dubbo/demo/DemoService.java
deleted file mode 100644
index 64672fa8fa..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/src/main/java/org/apache/dubbo/demo/DemoService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.dubbo.demo;
-
-public interface DemoService {
-
- String sayHello(String name);
-
-}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/src/main/java/org/apache/dubbo/demo/GreetingService.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
deleted file mode 100644
index 38c7a6072d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.dubbo.demo;
-
-/**
- *
- */
-public interface GreetingService {
- String hello();
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
deleted file mode 100644
index a3b4f41078..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.configuration;
-
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.client.RestTemplate;
-
-@Configuration
-public class RestTemplateConfiguration {
-
- @Bean
- @LoadBalanced
- RestTemplate loadBalancedRestTemplate() {
- return new RestTemplate();
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java
deleted file mode 100644
index 60b81750fd..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/MeController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class MeController {
-
- private String instanceId;
-
- @Autowired
- public MeController(@Value("${spring.cloud.consul.discovery.instance-id:${random.value}}") String instanceId) {
- this.instanceId = instanceId;
- }
-
- @GetMapping("/me")
- public String me() {
- return instanceId;
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java
deleted file mode 100644
index 0e8baf74bf..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/PropertyController.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.dubbo.samples.microservices.sc.controller;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RefreshScope
-@RestController
-@RequestMapping("/property")
-public class PropertyController {
-
- @Value("${applicationProp:default value}")
- private String applicationProperty;
-
- @Value("${property:default value}")
- private String property;
-
- @Value("${property2:default value}")
- private String property2;
-
- @Value("${infrastructureDesc:default value}")
- private String infrastructureDesc;
-
- @Value("${infrastructureUserName:default value}")
- private String infrastructureUserName;
-
- @Value("${infrastructurePassword:default value}")
- private String infrastructurePassword;
-
- @Value("${password:mypassword}")
- private String secret;
-
- @RequestMapping
- public String getProperty() {
- return "
applicationProperty:
" + applicationProperty + ""
- + "
property:
" + property + ""
- + "
property2:
" + property2 + ""
- + "
infrastructureDesc:
" + infrastructureDesc + ""
- + "
infrastructureUserName:
" + infrastructureUserName + ""
- + "
infrastructurePassword:
" + infrastructurePassword + ""
- + "
vault password:
" + secret + "";
- }
-
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/resources/application.yml b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/resources/application.yml
deleted file mode 100644
index 51e5b318a4..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/resources/application.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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.
-#
-management:
- security:
- enabled: false
-endpoints:
- shutdown:
- enabled: false
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
deleted file mode 100644
index e5200062a9..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.dubbo.demo.provider;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.demo.provider.rest.UserService;
-import org.apache.dubbo.demo.provider.rest.UserServiceImpl;
-
-import java.util.concurrent.CountDownLatch;
-
-public class Application {
- private static String consulAddress = System.getProperty("consul.address", "127.0.0.1");
-
- public static void main(String[] args) throws Exception {
- ServiceConfig service = new ServiceConfig<>();
- service.setInterface(UserService.class);
- service.setRef(new UserServiceImpl());
-
- ProtocolConfig protocolConfig = new ProtocolConfig("rest");
- protocolConfig.setPort(8090);
-
- DubboBootstrap bootstrap = DubboBootstrap.getInstance();
- bootstrap.application(new ApplicationConfig("dubbo-provider-for-sc"))
- .registry(new RegistryConfig(String.format("consul://%s:8500?registry-type=service", consulAddress)))
- .protocol(protocolConfig)
- .service(service)
- .start();
-
- System.out.println("dubbo service started");
- new CountDownLatch(1).await();
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserService.java b/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserService.java
deleted file mode 100644
index 14b2f38337..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * 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.dubbo.demo.provider.rest;
-
-
-import org.apache.dubbo.rpc.protocol.rest.support.ContentType;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-@Path("users")
-@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
-@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
-@Api(value = "UserService")
-public interface UserService {
-
- @GET
- @Path("{id : \\d+}")
- @ApiOperation(value = "getUser")
- User getUser(@ApiParam(value = "id") @PathParam("id") Long id);
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/DemoService.java b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/DemoService.java
deleted file mode 100644
index 64672fa8fa..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/DemoService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.dubbo.demo;
-
-public interface DemoService {
-
- String sayHello(String name);
-
-}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/GreetingService.java b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
deleted file mode 100644
index 38c7a6072d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.dubbo.demo;
-
-/**
- *
- */
-public interface GreetingService {
- String hello();
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/dubbo.properties
deleted file mode 100644
index 8c3cb2559c..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/dubbo.properties
+++ /dev/null
@@ -1 +0,0 @@
-dubbo.application.qos.port=33333
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/dubbo.properties
deleted file mode 100644
index 8c3cb2559c..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/dubbo.properties
+++ /dev/null
@@ -1 +0,0 @@
-dubbo.application.qos.port=33333
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/log4j.properties
deleted file mode 100644
index 2424381490..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-###set log levels###
-log4j.rootLogger=info, stdout
-###output to console###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
deleted file mode 100644
index 3cbf71311c..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.dubbo.demo.provider;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.util.concurrent.CountDownLatch;
-
-public class Application {
- public static void main(String[] args) throws Exception {
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-provider.xml");
- context.start();
-
- System.out.println("dubbo service started");
- new CountDownLatch(1).await();
- }
-}
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/dubbo.properties
deleted file mode 100644
index ad602baa94..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/dubbo.properties
+++ /dev/null
@@ -1 +0,0 @@
-dubbo.application.qos.port=22222
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/log4j.properties
deleted file mode 100644
index 15a0900f0d..0000000000
--- a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-###set log levels###
-log4j.rootLogger=info, stdout
-###output to the console###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/case-configuration.yml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/case-configuration.yml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/case-configuration.yml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/case-configuration.yml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/case-versions.conf b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/case-versions.conf
similarity index 97%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/case-versions.conf
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/case-versions.conf
index 9a2ae82744..2d83b63d42 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/case-versions.conf
+++ b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/case-versions.conf
@@ -20,6 +20,6 @@
# Supported component versions of the test case
# Spring app
-dubbo.version=3.*
+dubbo.version=2.1*
spring.version=4.*, 5.*
java.version= [<= 11]
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-api/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-api/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/src/main/java/org/apache/dubbo/demo/DemoService.java b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/DemoService.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/src/main/java/org/apache/dubbo/demo/DemoService.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/DemoService.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/src/main/java/org/apache/dubbo/demo/GreetingService.java b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/README.md b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/README.md
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/README.md
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/README.md
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/spring/dubbo-consumer.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/spring/dubbo-consumer.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/spring/dubbo-consumer.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/spring/dubbo-consumer.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/README.md b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/README.md
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/README.md
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/README.md
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/java/org/apache/dubbo/demo/provider/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider2/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/spring/dubbo-provider.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/spring/dubbo-provider.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/spring/dubbo-provider.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/spring/dubbo-provider.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/case-configuration.yml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/case-configuration.yml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/case-configuration.yml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/case-configuration.yml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/case-versions.conf b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/case-versions.conf
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/case-versions.conf
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/case-versions.conf
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/src/main/java/org/apache/dubbo/demo/DemoService.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/src/main/java/org/apache/dubbo/demo/DemoService.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/src/main/java/org/apache/dubbo/demo/DemoService.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-api/src/main/java/org/apache/dubbo/demo/DemoService.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/UpgradeUtil.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/UpgradeUtil.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/UpgradeUtil.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/java/org/apache/dubbo/demo/consumer/UpgradeUtil.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/spring/dubbo-consumer.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/spring/dubbo-consumer.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/spring/dubbo-consumer.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/spring/dubbo-consumer.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConfigIT.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConfigIT.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConfigIT.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConfigIT.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/FrameworkStatusReporterImpl.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/FrameworkStatusReporterImpl.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/FrameworkStatusReporterImpl.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/java/org/apache/dubbo/demo/consumer/FrameworkStatusReporterImpl.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/resources/META-INF/dubbo/internal/org.apache.dubbo.common.status.reporter.FrameworkStatusReporter b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/resources/META-INF/dubbo/internal/org.apache.dubbo.common.status.reporter.FrameworkStatusReporter
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/resources/META-INF/dubbo/internal/org.apache.dubbo.common.status.reporter.FrameworkStatusReporter
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/test/resources/META-INF/dubbo/internal/org.apache.dubbo.common.status.reporter.FrameworkStatusReporter
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromNormal.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromNormal.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromNormal.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromNormal.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/spring/dubbo-provider.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/spring/dubbo-provider.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/spring/dubbo-provider.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/spring/dubbo-provider.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/java/org/apache/dubbo/demo/provider/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromDual.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromService.java b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromService.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromService.java
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/DemoServiceFromService.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider1/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/spring/dubbo-provider.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/spring/dubbo-provider.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/spring/dubbo-provider.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/spring/dubbo-provider.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/pom.xml b/2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/dubbo-servicediscovery-migration/pom.xml
diff --git a/2-advanced/dubbo-samples-service-discovery/pom.xml b/2-advanced/dubbo-samples-service-discovery/pom.xml
new file mode 100644
index 0000000000..cca8de5155
--- /dev/null
+++ b/2-advanced/dubbo-samples-service-discovery/pom.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.dubbo
+ dubbo-samples-service-discovery
+ pom
+ 1.0-SNAPSHOT
+ Dubbo Sample Service Discovery Model
+ Dubbo Sample Service Discovery Model
+
+
+ dubbo-demo-servicediscovery-xml
+ dubbo-servicediscovery-migration
+ servicediscovery-transfer
+
+
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/case-configuration.yml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/case-configuration.yml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/case-configuration.yml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/case-configuration.yml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/case-versions.conf b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/case-versions.conf
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/case-versions.conf
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/case-versions.conf
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/pom.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/pom.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-api/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-api/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-api/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/DemoService.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/DemoService.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-api/src/main/java/org/apache/dubbo/demo/DemoService.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/DemoService.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/src/main/java/org/apache/dubbo/demo/GreetingService.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-api/src/main/java/org/apache/dubbo/demo/GreetingService.java
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/pom.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/java/org/apache/dubbo/demo/consumer/Application.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/java/org/apache/dubbo/demo/consumer/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/java/org/apache/dubbo/demo/consumer/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/java/org/apache/dubbo/demo/consumer/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-consumer/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/spring/dubbo-consumer.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/spring/dubbo-consumer.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/spring/dubbo-consumer.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/spring/dubbo-consumer.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/test/java/org/apache/dubbo/demo/DemoServiceIT.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/test/java/org/apache/dubbo/demo/DemoServiceIT.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/test/java/org/apache/dubbo/demo/DemoServiceIT.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/test/java/org/apache/dubbo/demo/DemoServiceIT.java
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/pom.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-consumer/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/spring/dubbo-consumer.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/spring/dubbo-consumer.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/spring/dubbo-consumer.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/main/resources/spring/dubbo-consumer.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-consumer/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceIT.java
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/README.md b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/README.md
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/README.md
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/README.md
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/pom.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/java/org/apache/dubbo/demo/provider/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/GreetingServiceImpl.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/GreetingServiceImpl.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/GreetingServiceImpl.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/GreetingServiceImpl.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-demo-servicediscovery-xml/servicediscovery-provider/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-servicediscovery-migration/dubbo-servicediscovery-migration-provider2/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/spring/dubbo-provider.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/spring/dubbo-provider.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/spring/dubbo-provider.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/spring/dubbo-provider.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/README.md b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/README.md
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/README.md
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/README.md
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/pom.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/pom.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/pom.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/pom.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/Application.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/java/org/apache/dubbo/demo/provider/Application.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/java/org/apache/dubbo/demo/provider/DemoServiceImpl.java
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/dubbo.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/dubbo.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/dubbo.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/dubbo.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/spring/dubbo-provider.xml b/2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/spring/dubbo-provider.xml
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/spring/dubbo-provider.xml
rename to 2-advanced/dubbo-samples-service-discovery/servicediscovery-transfer/servicediscovery-transfer-provider/src/main/resources/spring/dubbo-provider.xml
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/README.md b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/README.md
similarity index 59%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/README.md
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/README.md
index e42c3e7466..4170ff772c 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/README.md
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/README.md
@@ -1,5 +1,8 @@
-Dubbo自动发现并消费原生Spring Cloud服务,以Consul为注册中心。
+Dubbo 作为消费者自动发现并消费原生 Spring Cloud 服务,示例以 Consul 为注册中心。
+## Spring Cloud 服务端
+
+## Dubbo 客户端
* Spring MVC方式开发服务端
* 以标准Dubbo方式开发客户端
* 首先,定义标准JAX-RS注解的接口(与Provider端相对应)
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/case-configuration.yml b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/case-configuration.yml
similarity index 71%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/case-configuration.yml
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/case-configuration.yml
index 5fafcf239a..e91088b6f2 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/case-configuration.yml
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/case-configuration.yml
@@ -17,33 +17,36 @@
ignoreFor: 'Interoperability between spring-cloud and dubbo is not ready?'
services:
- consul-server:
- image: consul:latest
+ nacos-server:
+ image: nacos/nacos-server:2.0.0
+ environment:
+ - PREFER_HOST_MODE=hostname
+ - MODE=standalone
+ - NACOS_AUTH_ENABLE=true
+ - JVM_XMS=512m
+ - JVM_XMX=512m
+ - JVM_XMN=256m
- dubbo-sc-provider:
+ sc-provider:
type: app
- basedir: dubbo-sc-provider
+ basedir: sc-provider
mainClass: org.apache.dubbo.samples.microservices.sc.Application
- systemProps:
- - consul.address=consul-server
waitPortsBeforeRun:
- - consul-server:8500
+ - nacos-server:8848
checkPorts:
- 8099
- checkLog: "dubbo service started"
+ checkLog: "sc-provider started"
depends_on:
- - consul-server
+ - nacos-server
dubbo-sc-consumer-test:
type: test
- basedir: dubbo-sc-consumer
+ basedir: sc-consumer
tests:
- "**/*IT.class"
- systemProps:
- - consul.address=consul-server
waitPortsBeforeRun:
- - consul-server:8500
- - dubbo-sc-provider:8099
+ - nacos-server:8848
+ - sc-provider:8099
depends_on:
- - consul-server
- - dubbo-sc-provider
+ - nacos-server
+ - sc-provider
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/case-versions.conf b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/case-versions.conf
similarity index 95%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/case-versions.conf
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/case-versions.conf
index fca7c7ed22..d998630398 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/case-versions.conf
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/case-versions.conf
@@ -20,6 +20,6 @@
# Supported component versions of the test case
# SpringBoot/SpringCloud app
-dubbo.version=2.7*
-spring-boot.version=1.*
+dubbo.version=3.3.*
+spring-boot.version=2.7.*
java.version= [ <= 11]
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/pom.xml b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/pom.xml
similarity index 55%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/pom.xml
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/pom.xml
index 5a35dd8969..3e107dcb7a 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/pom.xml
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/pom.xml
@@ -23,70 +23,36 @@
1.0-SNAPSHOT../pom.xml
- dubbo-sc-consumer
+ dubbo-consumerjar
- Dubbo Sc Consumer
+ Dubbo ConsumerThe demo consumer module of dubbo projecttrue
- org.apache.dubbo
- dubbo-sc-api
- ${project.parent.version}
-
-
- org.apache.dubbo
- dubbo-registry-multicast
-
-
- org.apache.dubbo
- dubbo-registry-nacos
-
-
- com.alibaba.nacos
- nacos-client
-
-
- org.apache.dubbo
- dubbo-registry-zookeeper
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
- org.apache.dubbo
- dubbo-configcenter-zookeeper
-
-
- org.apache.dubbo
- dubbo-configcenter-nacos
-
-
- org.apache.dubbo
- dubbo-metadata-report-nacos
-
-
- org.apache.dubbo
- dubbo-config-spring
-
-
- org.apache.dubbo
- dubbo-rpc-dubbo
-
-
- org.apache.dubbo
- dubbo-rpc-rest
+ org.springframework.boot
+ spring-boot-starter
+
org.apache.dubbo
- dubbo-remoting-netty4
+ dubbo-spring-boot-starterorg.apache.dubbo
- dubbo-serialization-hessian2
+ dubbo-nacos-spring-boot-starter
+
+
- org.apache.dubbo
- dubbo-registry-consul
+ com.squareup.okhttp3
+ okhttp
@@ -95,9 +61,8 @@
${junit.version}
- org.springframework
- spring-test
- test
+ org.springframework.boot
+ spring-boot-starter-test
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/DubboConsumerApplication.java
similarity index 65%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/DubboConsumerApplication.java
index 1903b84cb4..3ae61f22e9 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/DubboConsumerApplication.java
@@ -14,16 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.microservices.sc.feign;
+package org.apache.dubbo.demo.consumer;
-import org.springframework.cloud.netflix.feign.FeignClient;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-@FeignClient(name = "dubbo-provider-demo")
-public interface TestFeign {
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
- @RequestMapping(value="/users/1", method = RequestMethod.GET)
- String doAlive();
+@SpringBootApplication
+@EnableDubbo
+public class DubboConsumerApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(DubboConsumerApplication.class, args);
+ }
}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Task.java
similarity index 59%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Task.java
index 0bfd8a20e0..ec080ba881 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-consumer/src/main/java/org/apache/dubbo/demo/consumer/Application.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Task.java
@@ -16,17 +16,23 @@
*/
package org.apache.dubbo.demo.consumer;
-import org.apache.dubbo.samples.microservices.sc.rest.User;
-import org.apache.dubbo.samples.microservices.sc.rest.UserService;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.dubbo.samples.microservices.sc.rest.UserServiceFeign;
+import org.apache.dubbo.samples.microservices.sc.rest.model.User;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
-public class Application {
- public static void main(String[] args) {
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-consumer.xml");
- context.start();
- UserService userService = context.getBean("userService", UserService.class);
- User user = userService.getUser(1L);
- System.out.println("result: " + user);
+import java.util.List;
+
+@Component
+public class Task implements CommandLineRunner {
+ @DubboReference(providedBy = "spring-cloud-provider-for-dubbo", check = false)
+ private UserServiceFeign userService;
+
+ @Override
+ public void run(String... args) {
+ List users = userService.users();
+ System.out.println("Got user size: ======> " + users.size());
}
}
diff --git a/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserServiceFeign.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserServiceFeign.java
new file mode 100644
index 0000000000..37b8748f80
--- /dev/null
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserServiceFeign.java
@@ -0,0 +1,41 @@
+/*
+ * 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.dubbo.samples.microservices.sc.rest;
+
+import org.apache.dubbo.samples.microservices.sc.rest.model.User;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * Usually, this feign-annotated interface is copied from a Spring Cloud client application.
+ * So, for Dubbo to work as a Spring Cloud consumer, you don't have to write a new interface(the service), just copy from Spring Cloud application as is.
+ */
+
+@FeignClient(name = "spring-cloud-provider-for-dubbo")//TODO, better if this annotation can automatically match to provided-by in Dubbo
+@Controller // FIXME, controller annotation would not be mandatory after FeignClient being supported in dubbo-3.3.0 release.
+public interface UserServiceFeign {
+
+ //FIXME, produces should be application/json by default
+ @RequestMapping(value="/users/list", method = RequestMethod.GET, produces = "application/json")
+ List users();
+
+}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/User.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/model/User.java
similarity index 77%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/User.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/model/User.java
index bf63212f82..cb848b0958 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/User.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/model/User.java
@@ -16,27 +16,13 @@
* limitations under the License.
*
*/
-package org.apache.dubbo.demo.provider.rest;
+package org.apache.dubbo.samples.microservices.sc.rest.model;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
public class User implements Serializable {
-
- @NotNull
- @Min(1L)
private Long id;
- @NotNull
- @Size(min = 6, max = 50)
private String name;
public User() {
diff --git a/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/resources/application.yml b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/resources/application.yml
new file mode 100644
index 0000000000..5cda003d1d
--- /dev/null
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/resources/application.yml
@@ -0,0 +1,22 @@
+# 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.
+
+dubbo:
+ application:
+ name: dubbo-consumer
+ registry:
+ address: nacos://127.0.0.1:8848
+ register-mode: instance
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-consumer-old/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
similarity index 73%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
index a5b7ce8d43..e2441ca7f6 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/dubbo-consumer/src/test/java/org/apache/dubbo/sc/DubboSCIT.java
@@ -33,36 +33,33 @@
package org.apache.dubbo.sc;
-import org.apache.dubbo.demo.DemoService;
-import org.apache.dubbo.samples.microservices.sc.rest.User;
-import org.apache.dubbo.samples.microservices.sc.rest.UserService;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.dubbo.samples.microservices.sc.rest.UserServiceFeign;
+import org.apache.dubbo.samples.microservices.sc.rest.model.User;
+import org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = "classpath*:spring/dubbo-consumer.xml")
-public class DubboSCIT {
+import java.util.List;
- @Autowired
- private UserService userService;
+@SpringBootTest(classes = {DubboAutoConfiguration.class})
+@RunWith(SpringRunner.class)
+public class DubboSCIT {
- @Autowired
- private DemoService demoService;
+ @DubboReference(providedBy = "spring-cloud-provider-for-dubbo")
+ private UserServiceFeign userService;
@Test
public void test() {
- User user = userService.getUser(1L);
- System.out.println("result: " + user);
- Assert.assertEquals("username-1", user.getName());
-
- String hello = demoService.sayHello("world");
- System.out.println("result: " + hello);
- Assert.assertEquals("Hello world", hello);
-
+ List users = userService.users();
+ Assert.assertNotNull(users);
+ Assert.assertEquals(1, users.size());
}
}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/pom.xml b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/pom.xml
similarity index 67%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/pom.xml
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/pom.xml
index 0c1114fd3c..04622cc69d 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/pom.xml
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/pom.xml
@@ -25,13 +25,12 @@
org.apache.dubbodubbo-call-sc1.0-SNAPSHOT
- Dubbo Call Sc
- Dubbo Call Sc
+ Dubbo Call Spring Cloud
+ Dubbo Call Spring Cloud
- dubbo-sc-provider
- dubbo-sc-consumer
- dubbo-sc-api
+ sc-provider
+ dubbo-consumer
@@ -39,21 +38,41 @@
1.81.83.7.0
- 2.7.13
+ 3.3.0-beta.1-SNAPSHOT4.13.1
- 1.5.13.RELEASE
+ 2.7.8
+ 2021.0.5
+ 2021.0.5.0
+ 4.3.29.RELEASE
+
-
org.springframework.bootspring-boot-dependencies${spring-boot.version}pomimport
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring.cloud.version}
+ pom
+ import
+
+
+
+ com.alibaba.cloud
+ spring-cloud-alibaba-dependencies
+ ${spring.cloud.alibaba.version}
+ pom
+ import
+
+
org.apache.dubbodubbo-bom
@@ -61,11 +80,25 @@
pomimport
+
+ org.apache.dubbo
+ dubbo-dependencies-bom
+ ${dubbo.version}
+ pom
+ import
+ com.google.guavaguava32.0.0-jre
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/pom.xml b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/pom.xml
similarity index 55%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/pom.xml
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/pom.xml
index 995a65e2fc..daf1564282 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/pom.xml
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/pom.xml
@@ -28,57 +28,29 @@
../pom.xml
- dubbo-sc-provider
- Dubbo Sc Provider
- Dubbo Sc Provider
-
-
- 1.3.0.RELEASE
- 1.5.10.RELEASE
- Dalston.SR4
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- ${spring-cloud-dependencies.version}
- pom
- import
-
-
-
+ sc-provider
+ Spring Cloud Provider
+ Spring Cloud Provider
- org.springframework.cloud
- spring-cloud-context
-
-
- org.springframework.cloud
- spring-cloud-starter-feign
-
-
- org.springframework.cloud
- spring-cloud-starter-ribbon
+ org.springframework.boot
+ spring-boot-starter-web
+
- org.springframework.cloud
- spring-cloud-starter-consul-all
- ${spring-cloud-starter-consul.version}
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
- org.springframework.cloud
- spring-cloud-starter-consul-config
- ${spring-cloud-starter-consul.version}
+ org.springframework.boot
+ spring-boot-starter-actuatororg.springframework.bootspring-boot-starter-test
- ${spring-boot-starter-test.version}test
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/SpringCloudApplication.java
similarity index 81%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/SpringCloudApplication.java
index 0d0bbf6fa4..55a65174d7 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/SpringCloudApplication.java
@@ -14,23 +14,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.microservices.sc;
+package org.apache.dubbo.samples.sc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.feign.EnableFeignClients;
import java.util.concurrent.CountDownLatch;
@SpringBootApplication
@EnableDiscoveryClient
-@EnableFeignClients()
-public class Application {
+public class SpringCloudApplication {
public static void main(String[] args) throws Exception {
- SpringApplication.run(Application.class, args);
+ SpringApplication.run(SpringCloudApplication.class, args);
- System.out.println("dubbo service started");
+ System.out.println("sc-provider started");
new CountDownLatch(1).await();
}
}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/UserController.java
similarity index 65%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/UserController.java
index 645b213031..2a2f6e35cc 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/UserController.java
@@ -14,16 +14,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.microservices.sc.feign;
+package org.apache.dubbo.samples.sc;
+
+import org.apache.dubbo.samples.sc.model.User;
-import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Collections;
+import java.util.List;
-@FeignClient(name = "dubbo-provider-for-sc")
-public interface TestFeign {
+@RestController
+@RequestMapping("/users")
+public class UserController {
- @RequestMapping(value = "/users/1", method = RequestMethod.GET)
- String doAlive();
+ public UserController() {}
-}
+ @RequestMapping("/list")
+ public List getUser() {
+ return Collections.singletonList(new User(1L, "spring cloud server"));
+ }
+}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/model/User.java
similarity index 95%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java
rename to 2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/model/User.java
index 52f2abbc07..81b4ad7286 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/java/org/apache/dubbo/samples/sc/model/User.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.microservices.sc.controller;
+package org.apache.dubbo.samples.sc.model;
import java.io.Serializable;
diff --git a/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/resources/application.yml b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/resources/application.yml
new file mode 100644
index 0000000000..1b0fc2cfa3
--- /dev/null
+++ b/2-advanced/dubbo-samples-springcloud/dubbo-call-sc/sc-provider/src/main/resources/application.yml
@@ -0,0 +1,32 @@
+# 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: 8099
+
+spring:
+ application:
+ name: spring-cloud-provider-for-dubbo
+ cloud:
+ nacos:
+ serverAddr: 127.0.0.1:8848
+
+
+management:
+ security:
+ enabled: false
+endpoints:
+ shutdown:
+ enabled: false
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-springcloud/pom.xml b/2-advanced/dubbo-samples-springcloud/pom.xml
new file mode 100644
index 0000000000..8b4f17ec33
--- /dev/null
+++ b/2-advanced/dubbo-samples-springcloud/pom.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.dubbo
+ dubbo-samples-springcloud
+ pom
+ 1.0-SNAPSHOT
+ Dubbo Sample Spring Cloud
+ Dubbo Sample Spring Cloud
+
+
+ dubbo-call-sc
+ sc-call-dubbo
+
+
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/case-configuration.yml b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/case-configuration.yml
similarity index 66%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/case-configuration.yml
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/case-configuration.yml
index 98bde1784b..1c7bd5c877 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/case-configuration.yml
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/case-configuration.yml
@@ -17,50 +17,53 @@
ignoreFor: 'Interoperability between spring-cloud and dubbo is not ready?'
services:
- consul-server:
- image: consul:latest
+ nacos-server:
+ image: nacos/nacos-server:2.0.0
+ environment:
+ - PREFER_HOST_MODE=hostname
+ - MODE=standalone
+ - NACOS_AUTH_ENABLE=true
+ - JVM_XMS=512m
+ - JVM_XMX=512m
+ - JVM_XMN=256m
- sc-dubbo-provider:
+ dubbo-provider:
type: app
- basedir: sc-dubbo-provider
+ basedir: dubbo-provider
mainClass: org.apache.dubbo.demo.provider.Application
- systemProps:
- - consul.address=consul-server
waitPortsBeforeRun:
- - consul-server:8500
+ - nacos-server:8848
checkPorts:
- 8090
checkLog: "dubbo service started"
depends_on:
- - consul-server
+ - nacos-server
- sc-dubbo-consumer:
+ sc-consumer:
type: app
- basedir: sc-dubbo-consumer
+ basedir: sc-consumer
mainClass: org.apache.dubbo.samples.microservices.sc.Application
- systemProps:
- - consul.address=consul-server
waitPortsBeforeRun:
- - consul-server:8500
+ - nacos-server:8848
checkPorts:
- 8099
- checkLog: "dubbo service started"
+ checkLog: "sc-consumer started"
depends_on:
- - consul-server
+ - nacos-server
sc-dubbo-consumer-test:
type: test
- basedir: sc-dubbo-consumer
+ basedir: sc-consumer
tests:
- "**/*IT.class"
systemProps:
- - consul.address=consul-server
- - consumer.address=sc-dubbo-consumer
+ - nacos.address=nacos-server
+ - consumer.address=sc-consumer
waitPortsBeforeRun:
- - consul-server:8500
- - sc-dubbo-provider:8090
- - sc-dubbo-consumer:8099
+ - nacos-server:8848
+ - dubbo-provider:8090
+ - sc-consumer:8099
depends_on:
- - consul-server
- - sc-dubbo-provider
- - sc-dubbo-consumer
+ - nacos-server
+ - dubbo-provider
+ - sc-consumer
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/case-versions.conf b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/case-versions.conf
similarity index 95%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/case-versions.conf
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/case-versions.conf
index bcd2f7502c..1b4da911c7 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/case-versions.conf
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/case-versions.conf
@@ -20,6 +20,6 @@
# Supported component versions of the test case
# SpringBoot/SpringCloud app
-dubbo.version=2.7*
-spring-boot.version=1.*
+dubbo.version=3.3.*
+spring-boot.version=2.7.*
java.version= [<= 11]
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/pom.xml b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/pom.xml
similarity index 58%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/pom.xml
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/pom.xml
index ad3906e3bd..ccb52f737a 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/pom.xml
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/pom.xml
@@ -33,68 +33,29 @@
1.7.25
- sc-dubbo-provider
- Sc Dubbo Provider
- Sc Dubbo Provider
+ dubbo-provider
+ Dubbo Provider
+ Dubbo Providerorg.apache.dubbo
- sc-dubbo-api
- ${project.parent.version}
+ dubbo-spring-boot-starterorg.apache.dubbo
- dubbo-registry-multicast
-
-
- org.apache.dubbo
- dubbo-registry-nacos
-
-
- com.alibaba.nacos
- nacos-client
-
-
- org.apache.dubbo
- dubbo-registry-zookeeper
-
-
- org.apache.dubbo
- dubbo-registry-consul
-
-
- org.apache.dubbo
- dubbo-configcenter-zookeeper
-
-
- org.apache.dubbo
- dubbo-configcenter-nacos
-
-
- org.apache.dubbo
- dubbo-metadata-report-nacos
-
-
- org.apache.dubbo
- dubbo-rpc-dubbo
-
-
- org.apache.dubbo
- dubbo-rpc-rest
-
-
- org.apache.dubbo
- dubbo-config-spring
+ dubbo-nacos-spring-boot-starter
+
- org.apache.dubbo
- dubbo-remoting-netty4
+ org.springframework.boot
+ spring-boot-starter
- org.apache.dubbo
- dubbo-serialization-hessian2
+ org.springframework.boot
+ spring-boot-starter-web
+
org.slf4jslf4j-api
diff --git a/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/DubboProviderApplication.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/DubboProviderApplication.java
new file mode 100644
index 0000000000..521192bb91
--- /dev/null
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/DubboProviderApplication.java
@@ -0,0 +1,32 @@
+/*
+ * 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.dubbo.demo.provider;
+
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableDubbo
+public class DubboProviderApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(DubboProviderApplication.class, args);
+ }
+}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserServiceImpl.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserService.java
similarity index 58%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserServiceImpl.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserService.java
index fcf8875093..cd3d38b670 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/rest/UserServiceImpl.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserService.java
@@ -16,17 +16,25 @@
* limitations under the License.
*
*/
-package org.apache.dubbo.samples.microservices.sc.rest;
+package org.apache.dubbo.demo.provider.rest;
-import java.util.concurrent.atomic.AtomicLong;
+import org.apache.dubbo.demo.provider.rest.model.User;
-public class UserServiceImpl implements UserService {
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
- private final AtomicLong idGen = new AtomicLong();
+import java.util.List;
- @Override
- public User getUser(Long id) {
- return new User(id, "username" + id);
- }
+/**
+ * By adding Spring MVC annotations to the standard Dubbo interface, we can expose it as a rest service
+ * for Spring Cloud to consume.
+ */
+
+@RestController
+@RequestMapping("/users")
+public interface UserService {
+ @GetMapping(value = "/list")
+ List getUsers();
}
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserServiceImpl.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserServiceImpl.java
similarity index 76%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserServiceImpl.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserServiceImpl.java
index 397f4378ba..6fe589ab62 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserServiceImpl.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/UserServiceImpl.java
@@ -18,15 +18,16 @@
*/
package org.apache.dubbo.demo.provider.rest;
-import java.util.concurrent.atomic.AtomicLong;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.apache.dubbo.demo.provider.rest.model.User;
-public class UserServiceImpl implements UserService {
-
- private final AtomicLong idGen = new AtomicLong();
+import java.util.Collections;
+import java.util.List;
+@DubboService
+public class UserServiceImpl implements UserService {
@Override
- public User getUser(Long id) {
- return new User(id, "username" + id);
+ public List getUsers() {
+ return Collections.singletonList(new User(1L, "Dubbo provider!"));
}
-
}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/model/User.java
similarity index 96%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/model/User.java
index dd163f11a6..9fbb38e983 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/java/org/apache/dubbo/demo/provider/rest/model/User.java
@@ -16,7 +16,7 @@
* limitations under the License.
*
*/
-package org.apache.dubbo.samples.microservices.sc.controller;
+package org.apache.dubbo.demo.provider.rest.model;
import java.io.Serializable;
diff --git a/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/resources/application.yml b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/resources/application.yml
new file mode 100644
index 0000000000..d3e88a8a31
--- /dev/null
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/resources/application.yml
@@ -0,0 +1,25 @@
+# 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.
+
+dubbo:
+ application:
+ name: dubbo-provider-for-spring-cloud
+ registry:
+ address: nacos://127.0.0.1:8848
+ register-mode: instance
+ protocol:
+ name: rest
+ port: 8090
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/log4j.properties b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/resources/log4j.properties
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/servicediscovery-transfer/servicediscovery-transfer-provider-instance/src/main/resources/log4j.properties
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/dubbo-provider/src/main/resources/log4j.properties
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/pom.xml b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/pom.xml
similarity index 68%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/pom.xml
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/pom.xml
index 99a3a3911e..b7c1b12798 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/pom.xml
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/pom.xml
@@ -25,13 +25,12 @@
org.apache.dubbosc-call-dubbo1.0-SNAPSHOT
- Sc Call Dubbo
- Sc Call Dubbo
+ Spring Cloud Call Dubbo
+ Spring Cloud Call Dubbo
- sc-dubbo-api
- sc-dubbo-provider
- sc-dubbo-consumer
+ dubbo-provider
+ sc-consumer
@@ -40,21 +39,41 @@
1.81.83.7.0
- 2.7.134.13.1
- 1.5.13.RELEASE
+ 3.3.0-beta.1-SNAPSHOT
+ 2.7.8
+ 2021.0.5
+ 2021.0.5.0
+ 4.3.29.RELEASE
+
-
org.springframework.bootspring-boot-dependencies${spring-boot.version}pomimport
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring.cloud.version}
+ pom
+ import
+
+
+
+ com.alibaba.cloud
+ spring-cloud-alibaba-dependencies
+ ${spring.cloud.alibaba.version}
+ pom
+ import
+
+
org.apache.dubbodubbo-bom
@@ -62,11 +81,26 @@
pomimport
+
+ org.apache.dubbo
+ dubbo-dependencies-bom
+ ${dubbo.version}
+ pom
+ import
+
+
com.google.guavaguava32.0.0-jre
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/pom.xml b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/pom.xml
similarity index 60%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/pom.xml
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/pom.xml
index d30eb5a45e..a0b80d0ee1 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/pom.xml
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/pom.xml
@@ -28,61 +28,46 @@
4.0.0
- sc-dubbo-consumer
- Sc Dubbo Consumer
- Sc Dubbo Consumer
-
-
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- ${spring-cloud-dependencies.version}
- pom
- import
-
-
-
+ sc-consumer
+ Spring Cloud Consumer
+ Spring Cloud Consumer
- org.springframework.cloud
- spring-cloud-context
+ org.springframework.boot
+ spring-boot-starter-web
- org.springframework.cloud
- spring-cloud-starter-feign
+ org.springframework.boot
+ spring-boot-starter-actuator
+
org.springframework.cloud
- spring-cloud-starter-ribbon
+ spring-cloud-starter-openfeignorg.springframework.cloud
- spring-cloud-starter-consul-all
- ${spring-cloud-starter-consul.version}
+ spring-cloud-starter-loadbalancer
- org.springframework.cloud
- spring-cloud-starter-consul-config
- ${spring-cloud-starter-consul.version}
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discoveryorg.springframework.bootspring-boot-starter-test
- ${spring-boot-starter-test.version}test
+
+ junit
+ junit
+ ${junit.version}
+
-
- 1.3.0.RELEASE
- 1.5.10.RELEASE
- Dalston.SR4
-
-
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/SpringCloudApplication.java
similarity index 85%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/SpringCloudApplication.java
index 0d0bbf6fa4..3d1a3899a5 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/Application.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/SpringCloudApplication.java
@@ -19,18 +19,18 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.cloud.openfeign.EnableFeignClients;
import java.util.concurrent.CountDownLatch;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients()
-public class Application {
+public class SpringCloudApplication {
public static void main(String[] args) throws Exception {
- SpringApplication.run(Application.class, args);
+ SpringApplication.run(SpringCloudApplication.class, args);
- System.out.println("dubbo service started");
+ System.out.println("sc-consumer started");
new CountDownLatch(1).await();
}
}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/UserController.java
similarity index 66%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/UserController.java
index f897b370fd..029d9dcd5a 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/TestController.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/UserController.java
@@ -14,40 +14,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.microservices.sc.controller;
+package org.apache.dubbo.samples.microservices.sc;
-import org.apache.dubbo.samples.microservices.sc.feign.TestFeign;
+import org.apache.dubbo.samples.microservices.sc.feign.UserServiceFeign;
+import org.apache.dubbo.samples.microservices.sc.model.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
+import java.util.List;
+
@RestController
@RequestMapping("/dubbo")
-public class TestController {
-
- @Value("${spring.application.name}")
- private String appName;
+public class UserController {
private final RestTemplate restTemplate;
- private final TestFeign testFeign;
+ private final UserServiceFeign userServiceFeign;
- public TestController(RestTemplate restTemplate,
- TestFeign testFeign) {
+ public UserController(RestTemplate restTemplate,
+ UserServiceFeign userServiceFeign) {
this.restTemplate = restTemplate;
- this.testFeign = testFeign;
+ this.userServiceFeign = userServiceFeign;
}
- @RequestMapping("/rest/user")
+ @RequestMapping("/rest/test1")
public String doRestAliveUsingEurekaAndRibbon() {
- String url = "http://dubbo-provider-for-sc/users/1";
+ String url = "http://dubbo-provider-for-spring-cloud/users/list";
System.out.println("url: " + url);
return restTemplate.getForObject(url, String.class);
}
- @RequestMapping("/rest/user/feign")
- public String doRestAliveUsingFeign() {
- return testFeign.doAlive();
+ @RequestMapping("/rest/test2")
+ public List doRestAliveUsingFeign() {
+ return userServiceFeign.getUsers();
}
}
\ No newline at end of file
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
similarity index 100%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/configuration/RestTemplateConfiguration.java
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/UserServiceFeign.java
similarity index 75%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/UserServiceFeign.java
index afbdd7b008..a5b327856c 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-scdubbo/dubbo-scdubbo-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/TestFeign.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/feign/UserServiceFeign.java
@@ -14,17 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.dubbo.samples.microservices.sc.feign;
-import org.springframework.cloud.netflix.feign.FeignClient;
+import org.apache.dubbo.samples.microservices.sc.model.User;
+
+import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-@FeignClient(name = "dubbo-provider-demo")
-public interface TestFeign {
+import java.util.List;
+
+@FeignClient(name = "dubbo-provider-for-spring-cloud")
+public interface UserServiceFeign {
- @RequestMapping(value="/users/1", method = RequestMethod.GET)
- String doAlive();
+ @RequestMapping(value = "/users/list", method = RequestMethod.GET)
+ List getUsers();
}
diff --git a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/model/User.java
similarity index 95%
rename from 2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/model/User.java
index 52f2abbc07..943f5a9c2a 100644
--- a/2-advanced/dubbo-samples-cloud-native/dubbo-call-sc/dubbo-sc-provider/src/main/java/org/apache/dubbo/samples/microservices/sc/controller/User.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/java/org/apache/dubbo/samples/microservices/sc/model/User.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.microservices.sc.controller;
+package org.apache.dubbo.samples.microservices.sc.model;
import java.io.Serializable;
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/resources/bootstrap.yml b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/resources/application.yml
similarity index 89%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/resources/bootstrap.yml
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/resources/application.yml
index 346abc84d3..3ff65989f2 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/main/resources/bootstrap.yml
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/main/resources/application.yml
@@ -19,17 +19,14 @@ server:
spring:
application:
- name: scdubbo-provider
+ name: spring-cloud-consumer
cloud:
- consul:
- host: ${consul.address:127.0.0.1}
- port: 8500
- enabled: true
+ nacos:
+ serverAddr: 127.0.0.1:8848
management:
security:
enabled: false
-
endpoint:
consul:
enabled: false
diff --git a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
similarity index 67%
rename from 2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
rename to 2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
index 50c02e2bb6..813ca9bdf1 100644
--- a/2-advanced/dubbo-samples-cloud-native/sc-call-dubbo/sc-dubbo-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
+++ b/2-advanced/dubbo-samples-springcloud/sc-call-dubbo/sc-consumer/src/test/java/org/apache/dubbo/sc/ServiceDiscoveryIT.java
@@ -33,10 +33,19 @@
package org.apache.dubbo.sc;
+import org.apache.dubbo.samples.microservices.sc.model.User;
+
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(SpringRunner.class)
public class ServiceDiscoveryIT {
private static String consumerAddress = System.getProperty("consumer.address", "127.0.0.1");
@@ -44,13 +53,30 @@ public class ServiceDiscoveryIT {
@Test
public void test() {
- String url = String.format("http://%s:8099/dubbo/rest/user", consumerAddress);
+ String url = String.format("http://%s:8099/dubbo/rest/test1", consumerAddress);
RestTemplate restTemplate = new RestTemplate();
- String result = restTemplate.getForObject(url, String.class);
+ UserList userList = restTemplate.getForObject(url, UserList.class);
+
+ assert userList != null;
+ Assert.assertEquals(1, userList.getUsers().size());
+
+ }
+
+ public class UserList {
+ private List users;
- System.out.println("result: " + result);
- Assert.assertEquals("{\"id\":1,\"name\":\"username1\"}", result);
+ public UserList() {
+ users = new ArrayList<>();
+ }
+ public List getUsers() {
+ return users;
+ }
+
+ public void setUsers(List users) {
+ this.users = users;
+ }
}
+
}
diff --git a/2-advanced/pom.xml b/2-advanced/pom.xml
index 8ca228a8f4..49473389b1 100644
--- a/2-advanced/pom.xml
+++ b/2-advanced/pom.xml
@@ -33,7 +33,6 @@
dubbo-samples-cachedubbo-samples-callbackdubbo-samples-chain
- dubbo-samples-cloud-nativedubbo-samples-compatibledubbo-samples-contextdubbo-samples-direct
@@ -57,6 +56,8 @@
dubbo-samples-rpccontextdubbo-samples-spring-securitydubbo-samples-triple-streaming
+ dubbo-samples-springcloud
+ dubbo-samples-service-discoverydubbo-samples-triple-grpcdubbo-samples-triple-no-idl