Skip to content

Commit 611fafe

Browse files
authored
Introducing the samples deployed the external Servlet container (#720)
* Polish #718 : [Samples] Introducing the samples deployed the external Servlet container * Polish #718 : [Samples] Introducing the samples deployed the external Servlet container * Polish #718 : [Samples] Introducing the samples deployed the external Servlet container
1 parent d1e5055 commit 611fafe

File tree

47 files changed

+658
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+658
-56
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ If you still use the legacy Dubbo whose version is less than 2.7.0, please use t
8686

8787
### Build from Source
8888

89-
If you'd like to attempt to experience latest features, you also can build from source as follow:
89+
If you'd like to attempt to experience the latest features, you also can build from the source code as follow:
9090

9191
1. Maven install current project in your local repository.
9292
> Maven install = `mvn install`
@@ -150,7 +150,7 @@ public interface DemoService {
150150
# Spring boot application
151151
spring.application.name=dubbo-auto-configuration-provider-demo
152152
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
153-
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
153+
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
154154

155155
# Dubbo Application
156156
## The default value of dubbo.application.name is ${spring.application.name}

README_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public interface DemoService {
177177
# Spring boot application
178178
spring.application.name=dubbo-auto-configuration-provider-demo
179179
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
180-
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
180+
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
181181

182182
# Dubbo Application
183183
## The default value of dubbo.application.name is ${spring.application.name}

dubbo-spring-boot-actuator/README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Actuator endpoint `dubbo` supports Actuator Endpoints :
201201
"dubbo.protocol.port": "12345",
202202
"dubbo.registry.address": "N/A",
203203
"dubbo.registry.id": "my-registry",
204-
"dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.demo.provider.service"
204+
"dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.sample.provider.service"
205205
}
206206
```
207207

@@ -217,7 +217,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
217217

218218
```json
219219
{
220-
"[email protected].demo.api.DemoService#defaultDemoService": {
220+
"[email protected].sample.api.DemoService#defaultDemoService": {
221221
"accesslog": null,
222222
"actives": null,
223223
"cache": null,
@@ -233,9 +233,9 @@ The structure of JSON is simple Key-Value format , the key is property name as a
233233
"filter": "",
234234
"generic": "false",
235235
"group": null,
236-
"id": "org.apache.dubbo.spring.boot.demo.api.DemoService",
237-
"interface": "org.apache.dubbo.spring.boot.demo.api.DemoService",
238-
"interfaceClass": "org.apache.dubbo.spring.boot.demo.api.DemoService",
236+
"id": "org.apache.dubbo.spring.boot.sample.api.DemoService",
237+
"interface": "org.apache.dubbo.spring.boot.sample.api.DemoService",
238+
"interfaceClass": "org.apache.dubbo.spring.boot.sample.api.DemoService",
239239
"layer": null,
240240
"listener": "",
241241
"loadbalance": null,
@@ -245,7 +245,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
245245
"onconnect": null,
246246
"ondisconnect": null,
247247
"owner": null,
248-
"path": "org.apache.dubbo.spring.boot.demo.api.DemoService",
248+
"path": "org.apache.dubbo.spring.boot.sample.api.DemoService",
249249
"proxy": null,
250250
"retries": null,
251251
"scope": null,
@@ -254,7 +254,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
254254
"timeout": null,
255255
"token": null,
256256
"unexported": false,
257-
"uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
257+
"uniqueServiceName": "org.apache.dubbo.spring.boot.sample.api.DemoService:1.0.0",
258258
"validation": null,
259259
"version": "1.0.0",
260260
"warmup": null,
@@ -274,7 +274,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
274274

275275
```json
276276
{
277-
"private org.apache.dubbo.spring.boot.demo.api.DemoService org.apache.dubbo.spring.boot.demo.consumer.controller.DemoConsumerController.demoService": {
277+
"private org.apache.dubbo.spring.boot.sample.api.DemoService org.apache.dubbo.spring.boot.sample.consumer.controller.DemoConsumerController.demoService": {
278278
"actives": null,
279279
"cache": null,
280280
"callbacks": null,
@@ -285,17 +285,17 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
285285
"filter": "",
286286
"generic": null,
287287
"group": null,
288-
"id": "org.apache.dubbo.spring.boot.demo.api.DemoService",
289-
"interface": "org.apache.dubbo.spring.boot.demo.api.DemoService",
290-
"interfaceClass": "org.apache.dubbo.spring.boot.demo.api.DemoService",
288+
"id": "org.apache.dubbo.spring.boot.sample.api.DemoService",
289+
"interface": "org.apache.dubbo.spring.boot.sample.api.DemoService",
290+
"interfaceClass": "org.apache.dubbo.spring.boot.sample.api.DemoService",
291291
"layer": null,
292292
"lazy": null,
293293
"listener": "",
294294
"loadbalance": null,
295295
"local": null,
296296
"merger": null,
297297
"mock": null,
298-
"objectType": "org.apache.dubbo.spring.boot.demo.api.DemoService",
298+
"objectType": "org.apache.dubbo.spring.boot.sample.api.DemoService",
299299
"onconnect": null,
300300
"ondisconnect": null,
301301
"owner": null,
@@ -310,7 +310,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
310310
"stub": null,
311311
"stubevent": null,
312312
"timeout": null,
313-
"uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
313+
"uniqueServiceName": "org.apache.dubbo.spring.boot.sample.api.DemoService:1.0.0",
314314
"url": "dubbo://localhost:12345",
315315
"validation": null,
316316
"version": "1.0.0",

dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.dubbo.spring.boot.actuate.endpoint;
1818

19+
import org.apache.dubbo.config.annotation.DubboReference;
1920
import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
2021
import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboReferencesMetadata;
2122

@@ -26,7 +27,7 @@
2627
import java.util.Map;
2728

2829
/**
29-
* Dubbo {@link Reference} Metadata {@link Endpoint}
30+
* {@link DubboReference} Metadata {@link Endpoint}
3031
*
3132
* @since 2.7.0
3233
*/

dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.dubbo.spring.boot.actuate.endpoint;
1818

19+
import org.apache.dubbo.config.annotation.DubboService;
1920
import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
2021
import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboServicesMetadata;
2122

@@ -26,7 +27,7 @@
2627
import java.util.Map;
2728

2829
/**
29-
* Dubbo {@link Service} Metadata {@link Endpoint}
30+
* {@link DubboService} Metadata {@link Endpoint}
3031
*
3132
* @since 2.7.0
3233
*/

dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
1818

19+
import org.apache.dubbo.config.annotation.DubboReference;
1920
import org.apache.dubbo.config.spring.ReferenceBean;
2021
import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
2122

@@ -26,7 +27,7 @@
2627
import java.util.Map;
2728

2829
/**
29-
* Dubbo {@link Reference} Metadata
30+
* {@link DubboReference} Metadata
3031
*
3132
* @since 2.7.0
3233
*/

dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
1818

19+
import org.apache.dubbo.config.annotation.DubboService;
1920
import org.apache.dubbo.config.spring.ServiceBean;
2021

2122
import org.springframework.stereotype.Component;
@@ -24,7 +25,7 @@
2425
import java.util.Map;
2526

2627
/**
27-
* Dubbo {@link Service} Metadata
28+
* {@link DubboService} Metadata
2829
*
2930
* @since 2.7.0
3031
*/

dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
*/
1717
package org.apache.dubbo.spring.boot.autoconfigure;
1818

19+
import org.apache.dubbo.config.annotation.DubboReference;
20+
import org.apache.dubbo.config.annotation.DubboService;
1921
import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
2022
import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
23+
import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceClassPostProcessor;
2124
import org.apache.dubbo.config.spring.context.annotation.DubboConfigConfiguration;
2225
import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
2326

@@ -48,9 +51,9 @@
4851
/**
4952
* Dubbo Auto {@link Configuration}
5053
*
51-
* @see Reference
52-
* @see Service
53-
* @see ServiceAnnotationBeanPostProcessor
54+
* @see DubboReference
55+
* @see DubboService
56+
* @see ServiceClassPostProcessor
5457
* @see ReferenceAnnotationBeanPostProcessor
5558
* @since 2.7.0
5659
*/
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
1818

1919
import org.apache.dubbo.config.annotation.DubboReference;
2020
import org.apache.dubbo.config.annotation.Method;
21-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
21+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2222

2323
import org.slf4j.Logger;
2424
import org.slf4j.LoggerFactory;
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
1818

19-
import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
19+
import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
2020

2121
import org.springframework.boot.SpringApplication;
2222
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.provider.service;
17+
package org.apache.dubbo.spring.boot.sample.provider.service;
1818

1919
import org.apache.dubbo.config.annotation.DubboService;
20-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
20+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2121

2222
import org.slf4j.Logger;
2323
import org.slf4j.LoggerFactory;

dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Spring boot application
22
spring.application.name=dubbo-auto-configuration-provider-demo
33
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
4-
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
4+
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
55
# Dubbo Application
66
## The default value of dubbo.application.name is ${spring.application.name}
77
## dubbo.application.name=${spring.application.name}
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
1818

1919
import org.apache.dubbo.config.annotation.DubboReference;
20-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
20+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2121

2222
import org.slf4j.Logger;
2323
import org.slf4j.LoggerFactory;
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
18+
19+
import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
1820

19-
import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
2021
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2122
import org.springframework.boot.builder.SpringApplicationBuilder;
2223

Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.provider.service;
17+
package org.apache.dubbo.spring.boot.sample.provider.service;
1818

1919
import org.apache.dubbo.config.annotation.DubboService;
20-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
20+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2121

2222
import org.springframework.beans.factory.annotation.Value;
2323

dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Spring boot application
22
spring.application.name=dubbo-externalized-configuration-provider-sample
33
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
4-
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
4+
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
55

66
# Dubbo Application
77
## The default value of dubbo.application.name is ${spring.application.name}

dubbo-spring-boot-samples/pom.xml

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
<module>externalized-configuration-samples</module>
3939
<module>registry-samples</module>
4040
<module>service-introspection-samples</module>
41+
<module>servlet-container-samples</module>
42+
4143
</modules>
4244

4345
<build>
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
1818

1919
import org.apache.dubbo.config.annotation.DubboReference;
20-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
20+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2121

2222
import org.slf4j.Logger;
2323
import org.slf4j.LoggerFactory;
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.provider.bootstrap;
1818

19-
import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
19+
import org.apache.dubbo.spring.boot.sample.provider.service.DefaultDemoService;
2020

2121
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2222
import org.springframework.boot.builder.SpringApplicationBuilder;
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.provider.service;
17+
package org.apache.dubbo.spring.boot.sample.provider.service;
1818

1919
import org.apache.dubbo.config.annotation.DubboService;
20-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
20+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2121

2222
import org.springframework.beans.factory.annotation.Value;
2323

dubbo-spring-boot-samples/registry-samples/nacos-samples/provider-sample/src/main/resources/application.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Spring boot application
22
spring.application.name=dubbo-registry-nacos-provider-sample
33
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
4-
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
4+
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
55

66
# Dubbo Application
77
## The default value of dubbo.application.name is ${spring.application.name}

dubbo-spring-boot-samples/registry-samples/pom.xml

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
218
<project xmlns="http://maven.apache.org/POM/4.0.0"
319
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
420
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
17+
package org.apache.dubbo.spring.boot.sample.consumer.bootstrap;
1818

1919
import org.apache.dubbo.config.annotation.DubboReference;
20-
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
20+
import org.apache.dubbo.spring.boot.sample.consumer.DemoService;
2121

2222
import org.slf4j.Logger;
2323
import org.slf4j.LoggerFactory;

0 commit comments

Comments
 (0)