dubbo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mercybl...@apache.org
Subject [dubbo-spring-boot-project] branch 2.7.x updated: Introducing the samples deployed the external Servlet container (#720)
Date Tue, 26 May 2020 09:25:43 GMT
This is an automated email from the ASF dual-hosted git repository.

mercyblitz pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/dubbo-spring-boot-project.git


The following commit(s) were added to refs/heads/2.7.x by this push:
     new 611fafe  Introducing the samples deployed the external Servlet container (#720)
611fafe is described below

commit 611fafe44cdc5e426ffe3b45f6cae635eb693047
Author: Mercy Ma <mercyblitz@gmail.com>
AuthorDate: Tue May 26 17:25:36 2020 +0800

    Introducing the samples deployed the external Servlet container (#720)
    
    * Polish apache/dubbo-spring-boot-project#718 : [Samples] Introducing the samples deployed the external Servlet container
    
    * Polish apache/dubbo-spring-boot-project#718 : [Samples] Introducing the samples deployed the external Servlet container
    
    * Polish apache/dubbo-spring-boot-project#718 : [Samples] Introducing the samples deployed the external Servlet container
---
 README.md                                          |   4 +-
 README_CN.md                                       |   2 +-
 dubbo-spring-boot-actuator/README.md               |  26 ++---
 .../endpoint/DubboReferencesMetadataEndpoint.java  |   3 +-
 .../endpoint/DubboServicesMetadataEndpoint.java    |   3 +-
 .../endpoint/metadata/DubboReferencesMetadata.java |   3 +-
 .../endpoint/metadata/DubboServicesMetadata.java   |   3 +-
 .../boot/autoconfigure/DubboAutoConfiguration.java |   9 +-
 .../DubboAutoConfigurationConsumerBootstrap.java   |   4 +-
 .../DubboAutoConfigurationProviderBootstrap.java   |   4 +-
 .../provider/service/DefaultDemoService.java       |   4 +-
 .../src/main/resources/application.properties      |   2 +-
 ...ExternalizedConfigurationConsumerBootstrap.java |   4 +-
 .../demo/provider/service/DefaultDemoService.java  |  43 --------
 ...ExternalizedConfigurationProviderBootstrap.java |   5 +-
 .../provider/service/DefaultDemoService.java       |   4 +-
 .../src/main/resources/application.properties      |   2 +-
 dubbo-spring-boot-samples/pom.xml                  |   2 +
 .../DubboRegistryNacosConsumerBootstrap.java       |   4 +-
 .../DubboRegistryNacosProviderBootstrap.java       |   4 +-
 .../provider/service/DefaultDemoService.java       |   4 +-
 .../src/main/resources/application.properties      |   2 +-
 dubbo-spring-boot-samples/registry-samples/pom.xml |  16 +++
 .../DubboRegistryZooKeeperConsumerBootstrap.java   |   4 +-
 .../DubboRegistryZooKeeperProviderBootstrap.java   |   4 +-
 .../provider/service/DefaultDemoService.java       |   2 +-
 .../src/main/resources/application.properties      |   2 +-
 dubbo-spring-boot-samples/sample-api/pom.xml       |   1 +
 .../{demo => sample}/consumer/DemoService.java     |   2 +-
 .../nacos-samples/consumer-sample/pom.xml          |  16 +++
 ...NacosServiceIntrospectionConsumerBootstrap.java |   2 +-
 .../nacos-samples/pom.xml                          |  16 +++
 .../nacos-samples/provider-sample/pom.xml          |  16 +++
 .../provider/service/DefaultDemoService.java       |   2 +-
 .../service-introspection-samples/pom.xml          |  16 +++
 .../zookeeper-samples/consumer-sample/pom.xml      |  16 +++
 ...eeperServiceIntrospectionConsumerBootstrap.java |   2 +-
 .../zookeeper-samples/pom.xml                      |  16 +++
 .../zookeeper-samples/provider-sample/pom.xml      |  16 +++
 .../provider/service/DefaultDemoService.java       |   2 +-
 .../consumer-sample/pom.xml                        | 115 +++++++++++++++++++++
 .../DubboServletContainerConsumerBootstrap.java}   |  34 +++---
 .../src/main/resources/application.yml             |   8 ++
 .../pom.xml                                        |  23 ++++-
 .../provider-sample/pom.xml                        | 115 +++++++++++++++++++++
 .../DubboServletContainerProviderBootstrap.java    |  60 +++++++++++
 .../provider/service/DefaultDemoService.java       |   4 +-
 .../src/main/resources/application.properties      |  16 +++
 48 files changed, 546 insertions(+), 121 deletions(-)

diff --git a/README.md b/README.md
index ec3f472..0cd3254 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ If you still use the legacy Dubbo whose version is less than 2.7.0, please use t
 
 ### Build from Source
 
-If you'd like to attempt to experience latest features, you also can build from source as follow:
+If you'd like to attempt to experience the latest features, you also can build from the source code as follow:
 
 1. Maven install current project in your local repository.
 > Maven install = `mvn install`
@@ -150,7 +150,7 @@ public interface DemoService {
     # Spring boot application
     spring.application.name=dubbo-auto-configuration-provider-demo
     # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
-    dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
+    dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
 
     # Dubbo Application
     ## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/README_CN.md b/README_CN.md
index 63fafab..8d7b3eb 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -177,7 +177,7 @@ public interface DemoService {
     # Spring boot application
     spring.application.name=dubbo-auto-configuration-provider-demo
     # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
-    dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
+    dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
 
     # Dubbo Application
     ## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/dubbo-spring-boot-actuator/README.md b/dubbo-spring-boot-actuator/README.md
index 754820a..b501b9c 100644
--- a/dubbo-spring-boot-actuator/README.md
+++ b/dubbo-spring-boot-actuator/README.md
@@ -201,7 +201,7 @@ Actuator endpoint `dubbo` supports Actuator Endpoints :
   "dubbo.protocol.port": "12345",
   "dubbo.registry.address": "N/A",
   "dubbo.registry.id": "my-registry",
-  "dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.demo.provider.service"
+  "dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.sample.provider.service"
 }
 ```
 
@@ -217,7 +217,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
 
 ```json
 {
-  "ServiceBean@org.apache.dubbo.spring.boot.demo.api.DemoService#defaultDemoService": {
+  "ServiceBean@org.apache.dubbo.spring.boot.sample.api.DemoService#defaultDemoService": {
     "accesslog": null,
     "actives": null,
     "cache": null,
@@ -233,9 +233,9 @@ The structure of JSON is simple Key-Value format , the key is property name as a
     "filter": "",
     "generic": "false",
     "group": null,
-    "id": "org.apache.dubbo.spring.boot.demo.api.DemoService",
-    "interface": "org.apache.dubbo.spring.boot.demo.api.DemoService",
-    "interfaceClass": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+    "id": "org.apache.dubbo.spring.boot.sample.api.DemoService",
+    "interface": "org.apache.dubbo.spring.boot.sample.api.DemoService",
+    "interfaceClass": "org.apache.dubbo.spring.boot.sample.api.DemoService",
     "layer": null,
     "listener": "",
     "loadbalance": null,
@@ -245,7 +245,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
     "onconnect": null,
     "ondisconnect": null,
     "owner": null,
-    "path": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+    "path": "org.apache.dubbo.spring.boot.sample.api.DemoService",
     "proxy": null,
     "retries": null,
     "scope": null,
@@ -254,7 +254,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
     "timeout": null,
     "token": null,
     "unexported": false,
-    "uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
+    "uniqueServiceName": "org.apache.dubbo.spring.boot.sample.api.DemoService:1.0.0",
     "validation": null,
     "version": "1.0.0",
     "warmup": null,
@@ -274,7 +274,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
 
 ```json
 {
-  "private org.apache.dubbo.spring.boot.demo.api.DemoService org.apache.dubbo.spring.boot.demo.consumer.controller.DemoConsumerController.demoService": {
+  "private org.apache.dubbo.spring.boot.sample.api.DemoService org.apache.dubbo.spring.boot.sample.consumer.controller.DemoConsumerController.demoService": {
     "actives": null,
     "cache": null,
     "callbacks": null,
@@ -285,9 +285,9 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
     "filter": "",
     "generic": null,
     "group": null,
-    "id": "org.apache.dubbo.spring.boot.demo.api.DemoService",
-    "interface": "org.apache.dubbo.spring.boot.demo.api.DemoService",
-    "interfaceClass": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+    "id": "org.apache.dubbo.spring.boot.sample.api.DemoService",
+    "interface": "org.apache.dubbo.spring.boot.sample.api.DemoService",
+    "interfaceClass": "org.apache.dubbo.spring.boot.sample.api.DemoService",
     "layer": null,
     "lazy": null,
     "listener": "",
@@ -295,7 +295,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
     "local": null,
     "merger": null,
     "mock": null,
-    "objectType": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+    "objectType": "org.apache.dubbo.spring.boot.sample.api.DemoService",
     "onconnect": null,
     "ondisconnect": null,
     "owner": null,
@@ -310,7 +310,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
     "stub": null,
     "stubevent": null,
     "timeout": null,
-    "uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
+    "uniqueServiceName": "org.apache.dubbo.spring.boot.sample.api.DemoService:1.0.0",
     "url": "dubbo://localhost:12345",
     "validation": null,
     "version": "1.0.0",
diff --git a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java
index 40f04aa..f2497da 100644
--- a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java
@@ -16,6 +16,7 @@
  */
 package org.apache.dubbo.spring.boot.actuate.endpoint;
 
+import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
 import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboReferencesMetadata;
 
@@ -26,7 +27,7 @@ import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
 import java.util.Map;
 
 /**
- * Dubbo {@link Reference} Metadata {@link Endpoint}
+ * {@link DubboReference} Metadata {@link Endpoint}
  *
  * @since 2.7.0
  */
diff --git a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java
index d1947da..845dbc1 100644
--- a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java
@@ -16,6 +16,7 @@
  */
 package org.apache.dubbo.spring.boot.actuate.endpoint;
 
+import org.apache.dubbo.config.annotation.DubboService;
 import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
 import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboServicesMetadata;
 
@@ -26,7 +27,7 @@ import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
 import java.util.Map;
 
 /**
- * Dubbo {@link Service} Metadata {@link Endpoint}
+ * {@link DubboService} Metadata {@link Endpoint}
  *
  * @since 2.7.0
  */
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java
index d93ea3a..6087015 100644
--- a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java
@@ -16,6 +16,7 @@
  */
 package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
 
+import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.spring.ReferenceBean;
 import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
 
@@ -26,7 +27,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 
 /**
- * Dubbo {@link Reference} Metadata
+ * {@link DubboReference} Metadata
  *
  * @since 2.7.0
  */
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java
index 5f1847c..11ce4d5 100644
--- a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java
@@ -16,6 +16,7 @@
  */
 package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
 
+import org.apache.dubbo.config.annotation.DubboService;
 import org.apache.dubbo.config.spring.ServiceBean;
 
 import org.springframework.stereotype.Component;
@@ -24,7 +25,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 
 /**
- * Dubbo {@link Service} Metadata
+ *  {@link DubboService} Metadata
  *
  * @since 2.7.0
  */
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java
index 53b6dca..6a190cb 100644
--- a/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java
@@ -16,8 +16,11 @@
  */
 package org.apache.dubbo.spring.boot.autoconfigure;
 
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.dubbo.config.annotation.DubboService;
 import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
 import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceClassPostProcessor;
 import org.apache.dubbo.config.spring.context.annotation.DubboConfigConfiguration;
 import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
 
@@ -48,9 +51,9 @@ import static org.apache.dubbo.spring.boot.util.DubboUtils.MULTIPLE_CONFIG_PROPE
 /**
  * Dubbo Auto {@link Configuration}
  *
- * @see Reference
- * @see Service
- * @see ServiceAnnotationBeanPostProcessor
+ * @see DubboReference
+ * @see DubboService
+ * @see ServiceClassPostProcessor
  * @see ReferenceAnnotationBeanPostProcessor
  * @since 2.7.0
  */
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java b/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
similarity index 93%
rename from dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
rename to dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
index 91d7315..b61900f 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.Method;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
similarity index 90%
rename from dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
rename to dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
index 265208c..0c2c239 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
 
-import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
+import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
similarity index 93%
rename from dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
rename to dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index eab0793..75b1c37 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.service;
+package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties
index b3de3d9..db9e2db 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties
@@ -1,7 +1,7 @@
 # Spring boot application
 spring.application.name=dubbo-auto-configuration-provider-demo
 # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
-dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
 # Dubbo Application
 ## The default value of dubbo.application.name is ${spring.application.name}
 ## dubbo.application.name=${spring.application.name}
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
similarity index 94%
copy from dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
copy to dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
index 9d3b389..43064b4 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
deleted file mode 100644
index 3e4c424..0000000
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
+++ /dev/null
@@ -1,43 +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.spring.boot.demo.provider.service;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
-
-import org.springframework.beans.factory.annotation.Value;
-
-/**
- * Default {@link DemoService}
- *
- * @see DemoService
- * @since 2.7.0
- */
-@DubboService(version = "${demo.service.version}")
-public class DefaultDemoService implements DemoService {
-
-    /**
-     * The default value of ${dubbo.application.name} is ${spring.application.name}
-     */
-    @Value("${dubbo.application.name}")
-    private String serviceName;
-
-    @Override
-    public String sayHello(String name) {
-        return String.format("[%s] : Hello, %s", serviceName, name);
-    }
-}
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
similarity index 90%
rename from dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
rename to dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
index 2671f75..6acdfcd 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
@@ -14,9 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
+
+import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
 
-import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 
diff --git a/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
similarity index 91%
rename from dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
rename to dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index 3e4c424..133ff47 100644
--- a/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.service;
+package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.springframework.beans.factory.annotation.Value;
 
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties
index 400759a..c5f3fb3 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties
@@ -1,7 +1,7 @@
 # Spring boot application
 spring.application.name=dubbo-externalized-configuration-provider-sample
 # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
-dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
 
 # Dubbo Application
 ## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/dubbo-spring-boot-samples/pom.xml b/dubbo-spring-boot-samples/pom.xml
index 529b8f2..f2eb29d 100644
--- a/dubbo-spring-boot-samples/pom.xml
+++ b/dubbo-spring-boot-samples/pom.xml
@@ -38,6 +38,8 @@
         <module>externalized-configuration-samples</module>
         <module>registry-samples</module>
         <module>service-introspection-samples</module>
+        <module>servlet-container-samples</module>
+
     </modules>
 
     <build>
diff --git a/dubbo-spring-boot-samples/registry-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java b/dubbo-spring-boot-samples/registry-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
similarity index 92%
rename from dubbo-spring-boot-samples/registry-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
rename to dubbo-spring-boot-samples/registry-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
index 7c8ed2f..77fe061 100644
--- a/dubbo-spring-boot-samples/registry-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/registry-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java b/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
similarity index 89%
rename from dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
rename to dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
index 64b523f..f1ee64b 100644
--- a/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
 
-import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
+import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
 
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
diff --git a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
similarity index 91%
rename from dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
rename to dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index 3e4c424..133ff47 100644
--- a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.service;
+package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.springframework.beans.factory.annotation.Value;
 
diff --git a/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/resources/application.properties
index 5dbc220..025fe15 100644
--- a/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/resources/application.properties
@@ -1,7 +1,7 @@
 # Spring boot application
 spring.application.name=dubbo-registry-nacos-provider-sample
 # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
-dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
 
 # Dubbo Application
 ## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/dubbo-spring-boot-samples/registry-samples/pom.xml b/dubbo-spring-boot-samples/registry-samples/pom.xml
index 8417abc..284fee7 100644
--- a/dubbo-spring-boot-samples/registry-samples/pom.xml
+++ b/dubbo-spring-boot-samples/registry-samples/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
similarity index 93%
rename from dubbo-spring-boot-samples/registry-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
rename to dubbo-spring-boot-samples/registry-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
index d472c39..efde863 100644
--- a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
similarity index 89%
rename from dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
rename to dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
index ab33321..4f00ab7 100644
--- a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
 
-import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
+import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
 
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
similarity index 95%
copy from dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
copy to dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index 1fd59e8..133ff47 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -17,7 +17,7 @@
 package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.springframework.beans.factory.annotation.Value;
 
diff --git a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/resources/application.properties
index 5162818..e85f651 100644
--- a/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/registry-samples/zookeeper-samples/provider-sample/src/main/resources/application.properties
@@ -1,7 +1,7 @@
 # Spring boot application
 spring.application.name=dubbo-registry-zookeeper-provider-sample
 # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
-dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
 
 # Dubbo Application
 ## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/dubbo-spring-boot-samples/sample-api/pom.xml b/dubbo-spring-boot-samples/sample-api/pom.xml
index 7cb6da5..bc73fab 100644
--- a/dubbo-spring-boot-samples/sample-api/pom.xml
+++ b/dubbo-spring-boot-samples/sample-api/pom.xml
@@ -28,5 +28,6 @@
 
     <artifactId>dubbo-spring-boot-sample-api</artifactId>
     <name>Apache Dubbo Spring Boot :: Samples :: API</name>
+    <description>Apache Dubbo Spring Boot Samples API</description>
 
 </project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/DemoService.java b/dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/DemoService.java
similarity index 94%
rename from dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/DemoService.java
rename to dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/DemoService.java
index 905e94e..398591b 100644
--- a/dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/DemoService.java
+++ b/dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/DemoService.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.consumer;
+package org.apache.dubbo.spring.boot.sample.consumer;
 
 /**
  * Demo Service interface
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/pom.xml
index d7670d2..0fb6c5f 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboNacosServiceIntrospectionConsumerBootstrap.java b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboNacosServiceIntrospectionConsumerBootstrap.java
index 7c7819b..d8baac3 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboNacosServiceIntrospectionConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboNacosServiceIntrospectionConsumerBootstrap.java
@@ -17,7 +17,7 @@
 package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/pom.xml
index fd707e0..29af9b1 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/pom.xml
index 8a01061..6b709fd 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index 1fd59e8..133ff47 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -17,7 +17,7 @@
 package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.springframework.beans.factory.annotation.Value;
 
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/pom.xml
index c4591b1..f7d0515 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/pom.xml
index 7c7fc29..7c6b0c7 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboZooKeeperServiceIntrospectionConsumerBootstrap.java b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboZooKeeperServiceIntrospectionConsumerBootstrap.java
index 2d97872..7ab2eb7 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboZooKeeperServiceIntrospectionConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboZooKeeperServiceIntrospectionConsumerBootstrap.java
@@ -17,7 +17,7 @@
 package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/pom.xml
index 1299fda..0efedbf 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/pom.xml
index 3952add..8f0a6d2 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/pom.xml
+++ b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index 1fd59e8..133ff47 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -17,7 +17,7 @@
 package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.springframework.beans.factory.annotation.Value;
 
diff --git a/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/pom.xml
new file mode 100644
index 0000000..874a54a
--- /dev/null
+++ b/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.dubbo.samples</groupId>
+        <artifactId>dubbo-spring-boot-servlet-container-samples</artifactId>
+        <version>${revision}</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dubbo-spring-boot-servlet-container-consumer-sample</artifactId>
+    <name>Apache Dubbo Spring Boot :: Samples :: Servlet Container :: Consumer Sample</name>
+    <description>Apache Dubbo Spring Boot Servlet Container Consumer Sample</description>
+    <packaging>war</packaging>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Spring Boot dependencies -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-tomcat</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+        <!-- Dubbo Spring Boot dependencies -->
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-spring-boot-starter</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-spring-boot-actuator</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo.samples</groupId>
+            <artifactId>dubbo-spring-boot-sample-api</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                </configuration>
+            </plugin>
+
+            <!-- Tomcat 8 Maven 插件用于构建可执行 war -->
+            <!-- https://mvnrepository.com/artifact/org.apache.tomcat.maven/tomcat8-maven-plugin -->
+            <plugin>
+                <groupId>org.apache.tomcat.maven</groupId>
+                <artifactId>tomcat8-maven-plugin</artifactId>
+                <version>3.0-r1655215</version>
+                <executions>
+                    <execution>
+                        <id>tomcat-run</id>
+                        <goals>
+                            <!-- 最终打包成可执行的jar包 -->
+                            <goal>exec-war-only</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <!-- ServletContext 路径 -->
+                            <path>/</path>
+                            <httpPort>9090</httpPort>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java b/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboServletContainerConsumerBootstrap.java
similarity index 64%
rename from dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
rename to dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboServletContainerConsumerBootstrap.java
index 9d3b389..ec798a8 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/sample/consumer/bootstrap/DubboServletContainerConsumerBootstrap.java
@@ -14,46 +14,42 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
 
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.ApplicationRunner;
 import org.springframework.boot.SpringApplication;
+import org.springframework.boot.WebApplicationType;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.context.annotation.Bean;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import static org.springframework.web.bind.annotation.RequestMethod.GET;
 
-/**
- * Dubbo Externalized Configuration Consumer Bootstrap
- */
 @EnableAutoConfiguration
 @RestController
-public class DubboExternalizedConfigurationConsumerBootstrap {
-
-    private final Logger logger = LoggerFactory.getLogger(getClass());
+public class DubboServletContainerConsumerBootstrap extends SpringBootServletInitializer {
 
     @DubboReference(version = "${demo.service.version}", url = "${demo.service.url}")
     private DemoService demoService;
 
-    public static void main(String[] args) {
-        SpringApplication.run(DubboExternalizedConfigurationConsumerBootstrap.class);
-    }
-
     @RequestMapping(value = "/say-hello", method = GET)
     public String sayHello(@RequestParam String name) {
         return demoService.sayHello(name);
     }
 
-    @Bean
-    public ApplicationRunner runner() {
-        return args -> logger.info(demoService.sayHello("mercyblitz"));
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+        return application.sources(getClass());
+    }
+
+    public static void main(String[] args) { // Run as the generic Spring Boot Web(Servlet) Application
+        SpringApplication application = new SpringApplication(DubboServletContainerConsumerBootstrap.class);
+        application.setWebApplicationType(WebApplicationType.SERVLET);
+        application.run(args);
     }
 }
diff --git a/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/src/main/resources/application.yml b/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/src/main/resources/application.yml
new file mode 100644
index 0000000..dffb18b
--- /dev/null
+++ b/dubbo-spring-boot-samples/servlet-container-samples/consumer-sample/src/main/resources/application.yml
@@ -0,0 +1,8 @@
+spring:
+  application:
+    name: dubbo-servlet-container-consumer-sample
+
+demo:
+  service:
+    version: 1.0.0
+    url: dubbo://127.0.0.1:23456
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/sample-api/pom.xml b/dubbo-spring-boot-samples/servlet-container-samples/pom.xml
similarity index 62%
copy from dubbo-spring-boot-samples/sample-api/pom.xml
copy to dubbo-spring-boot-samples/servlet-container-samples/pom.xml
index 7cb6da5..3bc24d4 100644
--- a/dubbo-spring-boot-samples/sample-api/pom.xml
+++ b/dubbo-spring-boot-samples/servlet-container-samples/pom.xml
@@ -26,7 +26,26 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>dubbo-spring-boot-sample-api</artifactId>
-    <name>Apache Dubbo Spring Boot :: Samples :: API</name>
+    <artifactId>dubbo-spring-boot-servlet-container-samples</artifactId>
+    <name>Apache Dubbo Spring Boot :: Samples :: Servlet Container</name>
+    <description>Apache Dubbo Spring Boot Servlet Container Samples</description>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>provider-sample</module>
+        <module>consumer-sample</module>
+    </modules>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <!-- tomcat8-maven-plugin 所在仓库 -->
+            <id>Alfresco</id>
+            <name>Alfresco Repository</name>
+            <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
 
 </project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/pom.xml
new file mode 100644
index 0000000..463804d
--- /dev/null
+++ b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.dubbo.samples</groupId>
+        <artifactId>dubbo-spring-boot-servlet-container-samples</artifactId>
+        <version>${revision}</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dubbo-spring-boot-servlet-container-provider-sample</artifactId>
+    <name>Apache Dubbo Spring Boot :: Samples :: Servlet Container :: Provider Sample</name>
+    <description>Apache Dubbo Spring Boot Servlet Container Provider Sample</description>
+    <packaging>war</packaging>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Spring Boot dependencies -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-tomcat</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+        <!-- Dubbo Spring Boot dependencies -->
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-spring-boot-starter</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-spring-boot-actuator</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo.samples</groupId>
+            <artifactId>dubbo-spring-boot-sample-api</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                </configuration>
+            </plugin>
+
+            <!-- Tomcat 8 Maven 插件用于构建可执行 war -->
+            <!-- https://mvnrepository.com/artifact/org.apache.tomcat.maven/tomcat8-maven-plugin -->
+            <plugin>
+                <groupId>org.apache.tomcat.maven</groupId>
+                <artifactId>tomcat8-maven-plugin</artifactId>
+                <version>3.0-r1655215</version>
+                <executions>
+                    <execution>
+                        <id>tomcat-run</id>
+                        <goals>
+                            <!-- 最终打包成可执行的jar包 -->
+                            <goal>exec-war-only</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <!-- ServletContext 路径 -->
+                            <path>/</path>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboServletContainerProviderBootstrap.java b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboServletContainerProviderBootstrap.java
new file mode 100644
index 0000000..47c0a92
--- /dev/null
+++ b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/bootstrap/DubboServletContainerProviderBootstrap.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
+
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Dubbo Servlet Container Provider Bootstrap
+ *
+ * @see DefaultDemoService
+ * @since 2.7.7
+ */
+@EnableAutoConfiguration
+@RestController
+public class DubboServletContainerProviderBootstrap extends SpringBootServletInitializer {
+
+    @Autowired
+    private DemoService demoService;
+
+    @RequestMapping("/say/{name}")
+    public String say(@PathVariable String name) {
+        return demoService.sayHello(name);
+    }
+
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+        return application.sources(getClass());
+    }
+
+    public static void main(String[] args) { // Run as the generic Spring Boot Web(Servlet) Application
+        SpringApplication application = new SpringApplication(DubboServletContainerProviderBootstrap.class);
+        application.setWebApplicationType(WebApplicationType.SERVLET);
+        application.run(args);
+    }
+}
diff --git a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
similarity index 94%
copy from dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
copy to dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
index 1fd59e8..fa6433a 100644
--- a/dubbo-spring-boot-samples/service-introspection-samples/zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/sample/provider/service/DefaultDemoService.java
@@ -17,7 +17,7 @@
 package org.apache.dubbo.spring.boot.sample.provider.service;
 
 import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
+import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
 
 import org.springframework.beans.factory.annotation.Value;
 
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Value;
  * Default {@link DemoService}
  *
  * @see DemoService
- * @since 2.7.0
+ * @since 2.7.7
  */
 @DubboService(version = "${demo.service.version}")
 public class DefaultDemoService implements DemoService {
diff --git a/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/resources/application.properties
new file mode 100644
index 0000000..fe474ca
--- /dev/null
+++ b/dubbo-spring-boot-samples/servlet-container-samples/provider-sample/src/main/resources/application.properties
@@ -0,0 +1,16 @@
+# Spring boot application
+spring.application.name=dubbo-spring-boot-servlet-container-provider-sample
+# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
+
+# Dubbo Application
+
+# Dubbo Protocol
+dubbo.protocol.name=dubbo
+dubbo.protocol.port=23456
+
+## Dubbo Registry
+dubbo.registry.address=N/A
+
+## DemoService version
+demo.service.version=1.0.0
\ No newline at end of file


Mime
View raw message