Skip to content

Commit

Permalink
Introducing the samples deployed the external Servlet container (#720)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mercyblitz authored May 26, 2020
1 parent d1e5055 commit 611fafe
Show file tree
Hide file tree
Showing 47 changed files with 658 additions and 56 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
26 changes: 13 additions & 13 deletions dubbo-spring-boot-actuator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```

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

```json
{
"[email protected].demo.api.DemoService#defaultDemoService": {
"[email protected].sample.api.DemoService#defaultDemoService": {
"accesslog": null,
"actives": null,
"cache": null,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -285,17 +285,17 @@ 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": "",
"loadbalance": null,
"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,
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -26,7 +27,7 @@
import java.util.Map;

/**
* Dubbo {@link Reference} Metadata {@link Endpoint}
* {@link DubboReference} Metadata {@link Endpoint}
*
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -26,7 +27,7 @@
import java.util.Map;

/**
* Dubbo {@link Service} Metadata {@link Endpoint}
* {@link DubboService} Metadata {@link Endpoint}
*
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -26,7 +27,7 @@
import java.util.Map;

/**
* Dubbo {@link Reference} Metadata
* {@link DubboReference} Metadata
*
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,7 +25,7 @@
import java.util.Map;

/**
* Dubbo {@link Service} Metadata
* {@link DubboService} Metadata
*
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -48,9 +51,9 @@
/**
* Dubbo Auto {@link Configuration}
*
* @see Reference
* @see Service
* @see ServiceAnnotationBeanPostProcessor
* @see DubboReference
* @see DubboService
* @see ServiceClassPostProcessor
* @see ReferenceAnnotationBeanPostProcessor
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 2 additions & 0 deletions dubbo-spring-boot-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
16 changes: 16 additions & 0 deletions dubbo-spring-boot-samples/registry-samples/pom.xml
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 611fafe

Please sign in to comment.