This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 2ff8f4b [type: feature] Support "Spring Cloud Alibaba Dubbo". (#2171)
2ff8f4b is described below
commit 2ff8f4ba7a41777bbf3ba17cf63de233875a96cf
Author: Qicz <[email protected]>
AuthorDate: Fri Oct 8 11:01:12 2021 +0800
[type: feature] Support "Spring Cloud Alibaba Dubbo". (#2171)
* [type: feature] Support "Spring Cloud Alibaba Dubbo".
Upgrade dubbo to 2.7.8, fix potential ConcurrentModificationException
(apche-dubbo#6031).
Replace "Alibaba Dubbo" with "Spring Cloud Alibaba Dubbo" at default.
* [type: feature] Support "Spring Cloud Alibaba Dubbo".
Upgrade dubbo to 2.7.8, fix potential ConcurrentModificationException
(apche-dubbo#6031).
* update bootstap config for alibaba dubbo default.
* remove unnecessary blank line and chinese comment.
* refactor Spring Cloud Alibaba Dubbo Support.
---
pom.xml | 18 +-
shenyu-bootstrap/pom.xml | 23 +++
.../src/main/resources/application-local.yml | 3 +-
shenyu-examples/shenyu-examples-dubbo/pom.xml | 1 +
.../pom.xml | 3 -
.../shenyu-examples-alibaba-dubbo-service/pom.xml | 3 -
.../pom.xml | 3 -
.../shenyu-examples-apache-dubbo-service/pom.xml | 3 -
.../pom.xml | 86 +++-------
.../http/spring-cloud-alibaba-dubbo-test-api.http | 187 +++++++++++++++++++++
.../TestSpringCloudDubboAnnotationApplication.java | 22 +--
...ringCloudAlibabaDubboMultiParamServiceImpl.java | 108 ++++++++++++
.../SpringCloudAlibabaDubboTestServiceImpl.java | 73 ++++++++
.../src/main/resources/application.yml | 35 +++-
shenyu-plugin/pom.xml | 4 +-
.../shenyu-plugin-dubbo}/pom.xml | 26 +--
.../shenyu-plugin-alibaba-dubbo}/pom.xml | 18 +-
.../plugin/alibaba/dubbo/AlibabaDubboPlugin.java | 34 +---
.../dubbo/cache/ApplicationConfigCache.java | 0
.../handler/AlibabaDubboPluginDataHandler.java | 0
.../dubbo/proxy/AlibabaDubboProxyService.java | 0
.../subscriber/AlibabaDubboMetaDataSubscriber.java | 0
.../alibaba/dubbo/AlibabaDubboPluginTest.java | 0
.../dubbo/cache/ApplicationConfigCacheTest.java | 0
.../dubbo/handler/AlibabaDubboPluginDataTest.java | 0
.../dubbo/proxy/AlibabaDubboProxyServiceTest.java | 0
.../ApacheDubboMetaDataSubscriberTest.java | 0
.../shenyu-plugin-apache-dubbo}/pom.xml | 20 +--
.../plugin/apache/dubbo/ApacheDubboPlugin.java | 34 +---
.../apache/dubbo/cache/ApplicationConfigCache.java | 0
.../handler/ApacheDubboPluginDataHandler.java | 0
.../dubbo/proxy/ApacheDubboGrayLoadBalance.java | 0
.../dubbo/proxy/ApacheDubboProxyService.java | 0
.../subscriber/ApacheDubboMetaDataSubscriber.java | 0
.../dubbo/org.apache.dubbo.rpc.cluster.LoadBalance | 0
.../plugin/apache/dubbo/ApacheDubboPluginTest.java | 0
.../dubbo/cache/ApplicationConfigCacheTest.java | 0
.../handler/ApacheDubboPluginDataHandlerTest.java | 0
.../dubbo/proxy/ApacheDubboProxyServiceTest.java | 0
.../ApacheDubboMetaDataSubscriberTest.java | 0
.../shenyu-plugin-dubbo-common/pom.xml | 4 +-
.../plugin/dubbo/common/AbstractDubboPlugin.java | 70 ++++++++
.../context/DubboShenyuContextDecorator.java | 0
.../common/param/DubboParamResolveService.java | 0
.../common/param/DubboParamResolveServiceImpl.java | 0
.../context/DubboShenyuContextDecoratorTest.java | 0
.../common/param/DubboParamResolveServiceTest.java | 0
.../shenyu-spring-boot-starter-plugin/pom.xml | 4 +-
.../pom.xml | 26 +--
.../pom.xml | 2 +-
.../dubbo/AlibabaDubboPluginConfiguration.java | 0
.../src/main/resources/META-INF/spring.factories | 0
.../src/main/resources/META-INF/spring.provides | 0
.../dubbo/AlibabaDubboPluginConfigurationTest.java | 0
.../pom.xml | 2 +-
.../dubbo/ApacheDubboPluginConfiguration.java | 0
.../src/main/resources/META-INF/spring.factories | 0
.../src/main/resources/META-INF/spring.provides | 0
.../dubbo/ApacheDubboPluginConfigurationTest.java | 0
.../pom.xml | 2 +-
.../dubbo/common/DubboCommonConfiguration.java | 0
.../src/main/resources/META-INF/spring.factories | 0
62 files changed, 591 insertions(+), 223 deletions(-)
diff --git a/pom.xml b/pom.xml
index d6ede67..17c894d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,7 +95,7 @@
<kryo.version>4.0.0</kryo.version>
<pagehelper.version>5.1.2</pagehelper.version>
<alibaba.dubbo.version>2.6.5</alibaba.dubbo.version>
- <apache.dubbo.version>2.7.5</apache.dubbo.version>
+ <apache.dubbo.version>2.7.8</apache.dubbo.version>
<gson.version>2.8.0</gson.version>
<okhttp.version>3.7.0</okhttp.version>
<prometheus-java-client.version>0.10.0</prometheus-java-client.version>
@@ -141,6 +141,8 @@
<bytebuddy.version>1.10.16</bytebuddy.version>
<spring-ldap.version>2.3.4.RELEASE</spring-ldap.version>
<jaxb.api.version>2.3.0</jaxb.api.version>
+
<spring-cloud-alibaba.version>2.2.3.RELEASE</spring-cloud-alibaba.version>
+ <netflix-ribbon.version>2.2.9.RELEASE</netflix-ribbon.version>
</properties>
<dependencyManagement>
@@ -155,6 +157,14 @@
</dependency>
<dependency>
+ <groupId>com.alibaba.cloud</groupId>
+ <artifactId>spring-cloud-alibaba-dependencies</artifactId>
+ <version>${spring-cloud-alibaba.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${bytebuddy.version}</version>
@@ -390,6 +400,12 @@
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
+ <version>${netflix-ribbon.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
diff --git a/shenyu-bootstrap/pom.xml b/shenyu-bootstrap/pom.xml
index 25f2e18..1ab2d66 100644
--- a/shenyu-bootstrap/pom.xml
+++ b/shenyu-bootstrap/pom.xml
@@ -309,6 +309,29 @@
</dependency>
<!--shenyu alibaba dubbo plugin end-->
+ <!--shenyu spring cloud alibaba dubbo plugin start-->
+ <!--
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+
<artifactId>shenyu-spring-boot-starter-plugin-apache-dubbo</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
+ <version>${netflix-ribbon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+ <artifactId>spring-cloud-starter-dubbo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+ </dependency>
+ -->
+ <!-- shenyu spring cloud alibaba dubbo end-->
+
<!--shenyu websocket plugin start-->
<dependency>
<groupId>org.apache.shenyu</groupId>
diff --git a/shenyu-bootstrap/src/main/resources/application-local.yml
b/shenyu-bootstrap/src/main/resources/application-local.yml
index 6151846..0ee69b7 100644
--- a/shenyu-bootstrap/src/main/resources/application-local.yml
+++ b/shenyu-bootstrap/src/main/resources/application-local.yml
@@ -25,7 +25,8 @@ spring:
# cloud:
# nacos:
# discovery:
-# server-addr: 127.0.0.1:8848
+# server-addr: 127.0.0.1:8848 # Spring Cloud Alibaba Dubbo use this.
+
# security:
# oauth2:
# client:
diff --git a/shenyu-examples/shenyu-examples-dubbo/pom.xml
b/shenyu-examples/shenyu-examples-dubbo/pom.xml
index 824289c..1877b64 100644
--- a/shenyu-examples/shenyu-examples-dubbo/pom.xml
+++ b/shenyu-examples/shenyu-examples-dubbo/pom.xml
@@ -34,6 +34,7 @@
<module>shenyu-examples-alibaba-dubbo-service</module>
<module>shenyu-examples-alibaba-dubbo-service-annotation</module>
<module>shenyu-examples-apache-dubbo-service-annotation</module>
+
<module>shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation</module>
</modules>
<dependencyManagement>
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/pom.xml
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/pom.xml
index dc75a58..eea95ae 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/pom.xml
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/pom.xml
@@ -47,18 +47,15 @@
<artifactId>shenyu-examples-dubbo-api</artifactId>
</dependency>
- <!--spring boot的核心启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
- <!--aop支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
- <!--自动配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/pom.xml
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/pom.xml
index dcf1e52..95acf53 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/pom.xml
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/pom.xml
@@ -53,7 +53,6 @@
<artifactId>shenyu-examples-dubbo-api</artifactId>
</dependency>
- <!--spring boot的核心启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
@@ -62,13 +61,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- <!--aop支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
- <!--自动配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
index 8984be6..e495399 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
@@ -53,18 +53,15 @@
<artifactId>shenyu-examples-dubbo-api</artifactId>
</dependency>
- <!--spring boot的核心启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
- <!--aop支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
- <!--自动配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/pom.xml
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/pom.xml
index 44dfee0..21e45aa 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/pom.xml
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/pom.xml
@@ -53,7 +53,6 @@
<artifactId>shenyu-examples-dubbo-api</artifactId>
</dependency>
- <!--spring boot的核心启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
@@ -62,13 +61,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- <!--aop支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
- <!--自动配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/pom.xml
similarity index 60%
copy from
shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
copy to
shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/pom.xml
index 8984be6..02b5596 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/pom.xml
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/pom.xml
@@ -15,6 +15,7 @@
~ 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">
@@ -25,15 +26,24 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-examples-apache-dubbo-service-annotation</artifactId>
+
<artifactId>shenyu-examples-cloud-alibaba-dubbo-service-annotation</artifactId>
<properties>
- <curator.version>4.0.1</curator.version>
- <nacos-client.version>1.1.4</nacos-client.version>
- <apache.dubbo.version>2.7.5</apache.dubbo.version>
- <zookeeper.version>3.4.6</zookeeper.version>
+
<spring-cloud-alibaba.version>2.2.3.RELEASE</spring-cloud-alibaba.version>
</properties>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+ <artifactId>spring-cloud-alibaba-dependencies</artifactId>
+ <version>${spring-cloud-alibaba.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>org.apache.shenyu</groupId>
@@ -41,30 +51,33 @@
<version>${shenyu.version}</version>
</dependency>
- <!--shenyu consul register center -->
- <!--<dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-consul-discovery</artifactId>
- <version>2.2.6.RELEASE</version>
- </dependency>-->
-
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-examples-dubbo-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
+ <version>2.2.0.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+ <artifactId>spring-cloud-starter-dubbo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.cloud</groupId>
+
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+ </dependency>
- <!--spring boot的核心启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
- <!--aop支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
- <!--自动配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
@@ -74,48 +87,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
-
- <!-- Dubbo dependency -->
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- <version>${apache.dubbo.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>${curator.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-recipes</artifactId>
- <version>${curator.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>${zookeeper.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
</dependencies>
<build>
@@ -126,5 +97,4 @@
</plugin>
</plugins>
</build>
-
</project>
\ No newline at end of file
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/http/spring-cloud-alibaba-dubbo-test-api.http
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/http/spring-cloud-alibaba-dubbo-test-api.http
new file mode 100644
index 0000000..5768fc5
--- /dev/null
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/http/spring-cloud-alibaba-dubbo-test-api.http
@@ -0,0 +1,187 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+### shengyu getway proxy orderSave
+POST http://localhost:9195/spring-cloud-alibaba-dubbo/findById
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123"
+}
+
+### shengyu getway proxy findAll
+GET http://localhost:9195/spring-cloud-alibaba-dubbo/findAll
+Accept: application/json
+
+
+### shengyu getway proxy insert
+POST http://localhost:9195/spring-cloud-alibaba-dubbo/insert
+Accept: application/json
+Content-Type: application/json
+
+{
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy findByIdsAndName
+GET http://localhost:9195/spring-cloud-alibaba-dubbo/findByIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByArrayIdsAndName
+GET http://localhost:9195/spring-cloud-alibaba-dubbo/findByArrayIdsAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ],
+ "name": "test"
+}
+
+### shengyu getway proxy findByStringArray
+GET http://localhost:9195/spring-cloud-alibaba-dubbo/findByStringArray
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ "123",
+ "124",
+ "125"
+ ]
+}
+
+### shengyu getway proxy findByListId
+GET http://localhost:9195/spring-cloud-alibaba-dubbo/findByListId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "ids": [
+ 123,
+ 124,
+ 125
+ ]
+}
+
+### shengyu getway proxy batchSave
+PUT http://localhost:9195/spring-cloud-alibaba-dubbo/batchSave
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ]
+}
+
+### shengyu getway proxy batchSaveAndNameAndId
+PUT http://localhost:9195/spring-cloud-alibaba-dubbo/batchSaveAndNameAndId
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaTestList": [
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ },
+ {
+ "id": "123",
+ "name": "test"
+ }
+ ],
+ "id": "123",
+ "name": "test"
+}
+
+### shengyu getway proxy saveComplexBeanTest
+PUT http://localhost:9195/spring-cloud-alibaba-dubbo/saveComplexBeanTest
+Accept: application/json
+Content-Type: application/json
+
+{
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+}
+
+### shengyu getway proxy saveComplexBeanTestAndName
+PUT http://localhost:9195/spring-cloud-alibaba-dubbo/saveComplexBeanTestAndName
+Accept: application/json
+Content-Type: application/json
+
+## The order of the parameters is important
+{
+ "complexBeanTest": {
+ "dubboTest": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ "123",
+ "124"
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+ },
+ "name": "name"
+}
+
+
+
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/TestSpringCloudDubboAnnotationApplication.java
similarity index 60%
copy from
shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
copy to
shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/TestSpringCloudDubboAnnotationApplication.java
index c8cdfb8..6c36a53 100644
---
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/TestSpringCloudDubboAnnotationApplication.java
@@ -15,23 +15,23 @@
* limitations under the License.
*/
-package org.apache.shenyu.plugin.dubbo.common.param;
+package org.apache.shenyu.examples.spring.cloud.dubbo.service.annotation;
-import org.apache.commons.lang3.tuple.Pair;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
- * The interface Generic param service.
- * This service is used to construct the parameters required for the dubbo
generalization.
+ * TestSpringCloudDubboAnnotationApplication.
*/
-public interface DubboParamResolveService {
+@SpringBootApplication
+public class TestSpringCloudDubboAnnotationApplication {
/**
- * Build parameter pair.
- * this is Resolve http body to get dubbo param.
+ * Main Entrance.
*
- * @param body the body
- * @param parameterTypes the parameter types
- * @return the pair
+ * @param args startup arguments
*/
- Pair<String[], Object[]> buildParameter(String body, String
parameterTypes);
+ public static void main(final String[] args) {
+ SpringApplication.run(TestSpringCloudDubboAnnotationApplication.class,
args);
+ }
}
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/impl/SpringCloudAlibabaDubboMultiParamServiceImpl.java
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/impl/SpringCloudAlibabaDubboMultiParamServiceImpl.java
new file mode 100644
index 0000000..7f77cb7
--- /dev/null
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/impl/SpringCloudAlibabaDubboMultiParamServiceImpl.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shenyu.examples.spring.cloud.dubbo.service.annotation.impl;
+
+import org.apache.dubbo.config.annotation.DubboService;
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
+import org.apache.shenyu.examples.dubbo.api.entity.ComplexBeanTest;
+import org.apache.shenyu.examples.dubbo.api.entity.DubboTest;
+import org.apache.shenyu.examples.dubbo.api.service.DubboMultiParamService;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * The type Dubbo multi param service.
+ */
+@DubboService
+public class SpringCloudAlibabaDubboMultiParamServiceImpl implements
DubboMultiParamService {
+
+ @Override
+ @ShenyuDubboClient(path = "/findByIdsAndName", desc = "findByIdsAndName")
+ public DubboTest findByIdsAndName(List<Integer> ids, String name) {
+ DubboTest test = new DubboTest();
+ test.setId(ids.toString());
+ test.setName("hello world shenyu apache dubbo param findByIdsAndName
:" + name);
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/findByArrayIdsAndName", desc =
"findByArrayIdsAndName")
+ public DubboTest findByArrayIdsAndName(Integer[] ids, String name) {
+ DubboTest test = new DubboTest();
+ test.setId(Arrays.toString(ids));
+ test.setName("hello world shenyu apache dubbo param
findByArrayIdsAndName :" + name);
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/findByStringArray", desc = "findByStringArray")
+ public DubboTest findByStringArray(String[] ids) {
+ DubboTest test = new DubboTest();
+ test.setId(Arrays.toString(ids));
+ test.setName("hello world shenyu apache dubbo param
findByStringArray");
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/findByListId", desc = "findByListId")
+ public DubboTest findByListId(List<String> ids) {
+ DubboTest test = new DubboTest();
+ test.setId(ids.toString());
+ test.setName("hello world shenyu apache dubbo param findByListId");
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/batchSave", desc = "batchSave")
+ public DubboTest batchSave(List<DubboTest> dubboTestList) {
+ DubboTest test = new DubboTest();
+
test.setId(dubboTestList.stream().map(DubboTest::getId).collect(Collectors.joining("-")));
+ test.setName("hello world shenyu apache dubbo param batchSave :" +
dubboTestList.stream().map(DubboTest::getName).collect(Collectors.joining("-")));
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/batchSaveAndNameAndId", desc =
"batchSaveAndNameAndId")
+ public DubboTest batchSaveAndNameAndId(List<DubboTest> dubboTestList,
String id, String name) {
+ DubboTest test = new DubboTest();
+ test.setId(id);
+ test.setName("hello world shenyu apache dubbo param
batchSaveAndNameAndId :" + name + ":" +
dubboTestList.stream().map(DubboTest::getName).collect(Collectors.joining("-")));
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/saveComplexBeanTest", desc =
"saveComplexBeanTest")
+ public DubboTest saveComplexBeanTest(ComplexBeanTest complexBeanTest) {
+ DubboTest test = new DubboTest();
+ test.setId(complexBeanTest.getIdLists().toString());
+ test.setName("hello world shenyu apache dubbo param
saveComplexBeanTest :" + complexBeanTest.getDubboTest().getName());
+ return test;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/saveComplexBeanTestAndName", desc =
"saveComplexBeanTestAndName")
+ public DubboTest saveComplexBeanTestAndName(ComplexBeanTest
complexBeanTest, String name) {
+ DubboTest test = new DubboTest();
+ test.setId(complexBeanTest.getIdLists().toString());
+ test.setName("hello world shenyu alibaba dubbo param
saveComplexBeanTestAndName :" + complexBeanTest.getDubboTest().getName() + "-"
+ name);
+ return test;
+ }
+}
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/impl/SpringCloudAlibabaDubboTestServiceImpl.java
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/impl/SpringCloudAlibabaDubboTestServiceImpl.java
new file mode 100644
index 0000000..c95552f
--- /dev/null
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/impl/SpringCloudAlibabaDubboTestServiceImpl.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express
+ * or implied. See the License for the specific language governing permissions
and limitations under
+ * the License.
+ *
+ */
+
+package org.apache.shenyu.examples.spring.cloud.dubbo.service.annotation.impl;
+
+import org.apache.dubbo.config.annotation.DubboService;
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
+import org.apache.shenyu.examples.dubbo.api.entity.DubboTest;
+import org.apache.shenyu.examples.dubbo.api.entity.ListResp;
+import org.apache.shenyu.examples.dubbo.api.service.DubboTestService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Random;
+
+/**
+ * The type Dubbo service.
+ */
+@DubboService
+public class SpringCloudAlibabaDubboTestServiceImpl implements
DubboTestService {
+
+ private static final Logger logger =
LoggerFactory.getLogger(SpringCloudAlibabaDubboTestServiceImpl.class);
+
+ @Override
+ @ShenyuDubboClient(path = "/findById", desc = "Query by Id")
+ public DubboTest findById(final String id) {
+ DubboTest dubboTest = new DubboTest();
+ dubboTest.setId(id);
+ dubboTest.setName("hello world shenyu Apache, findById");
+
logger.info("==========================================接口被调用===================================");
+ return dubboTest;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/findAll", desc = "Get all data")
+ public DubboTest findAll() {
+ DubboTest dubboTest = new DubboTest();
+ dubboTest.setName("hello world shenyu Apache, findAll");
+ dubboTest.setId(String.valueOf(new Random().nextInt()));
+ return dubboTest;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/insert", desc = "Insert a row of data")
+ public DubboTest insert(final DubboTest dubboTest) {
+ dubboTest.setName("hello world shenyu Apache Dubbo: " +
dubboTest.getName());
+ return dubboTest;
+ }
+
+ @Override
+ @ShenyuDubboClient(path = "/findList", desc = "Find list")
+ public ListResp findList() {
+ ListResp listResp = new ListResp();
+ listResp.setTotal(1);
+ listResp.setUsers(Arrays.asList(new DubboTest("1", "test")));
+ return listResp;
+ }
+}
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/resources/application.yml
similarity index 50%
copy from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
copy to
shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/resources/application.yml
index afdb110..02b953b 100644
---
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/resources/application.yml
@@ -1,4 +1,3 @@
-#
# 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.
@@ -13,7 +12,35 @@
# 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.
-#
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.shenyu.springboot.starter.plugin.apache.dubbo.ApacheDubboPluginConfiguration
+server:
+ port: 8011
+ address: 0.0.0.0
+ servlet:
+ context-path: /
+spring:
+ main:
+ allow-bean-definition-overriding: true
+ application:
+ name: test-spring-cloud-alibaba-dubbo-service
+
+shenyu:
+ client:
+ registerType: http #zookeeper #etcd #nacos #consul
+ serverLists: http://localhost:9095 #localhost:2181 #http://localhost:2379
#localhost:8848
+ props:
+ contextPath: /spring-cloud-alibaba-dubbo
+ appName: spring-cloud-alibaba-dubbo
+ nacosNameSpace: ShenyuRegisterCenter
+ port: 20888
+
+dubbo:
+ application:
+ name: ${spring.application.name}
+ registry:
+ address: nacos://127.0.0.1:8848
+ protocol:
+ name: dubbo
+ port: 20888
+ scan:
+ base-packages:
org.apache.shenyu.examples.cloud.dubbo.service.annotation.impl
diff --git a/shenyu-plugin/pom.xml b/shenyu-plugin/pom.xml
index 625057e..797a3a5 100644
--- a/shenyu-plugin/pom.xml
+++ b/shenyu-plugin/pom.xml
@@ -30,8 +30,6 @@
<module>shenyu-plugin-api</module>
<module>shenyu-plugin-base</module>
<module>shenyu-plugin-divide</module>
- <module>shenyu-plugin-alibaba-dubbo</module>
- <module>shenyu-plugin-apache-dubbo</module>
<module>shenyu-plugin-ratelimiter</module>
<module>shenyu-plugin-monitor</module>
<module>shenyu-plugin-sign</module>
@@ -48,7 +46,6 @@
<module>shenyu-plugin-context-path</module>
<module>shenyu-plugin-grpc</module>
<module>shenyu-plugin-redirect</module>
- <module>shenyu-plugin-dubbo-common</module>
<module>shenyu-plugin-motan</module>
<module>shenyu-plugin-logging</module>
<module>shenyu-plugin-modify-response</module>
@@ -59,5 +56,6 @@
<module>shenyu-plugin-param-mapping</module>
<module>shenyu-plugin-cryptor</module>
<module>shenyu-plugin-websocket</module>
+ <module>shenyu-plugin-dubbo</module>
</modules>
</project>
diff --git a/shenyu-examples/shenyu-examples-dubbo/pom.xml
b/shenyu-plugin/shenyu-plugin-dubbo/pom.xml
similarity index 61%
copy from shenyu-examples/shenyu-examples-dubbo/pom.xml
copy to shenyu-plugin/shenyu-plugin-dubbo/pom.xml
index 824289c..2e1bcba 100644
--- a/shenyu-examples/shenyu-examples-dubbo/pom.xml
+++ b/shenyu-plugin/shenyu-plugin-dubbo/pom.xml
@@ -20,29 +20,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
+ <artifactId>shenyu-plugin</artifactId>
<groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples</artifactId>
- <version>2.1.0</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
+
<modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-examples-dubbo</artifactId>
+ <artifactId>shenyu-plugin-dubbo</artifactId>
<packaging>pom</packaging>
<modules>
- <module>shenyu-examples-dubbo-api</module>
- <module>shenyu-examples-apache-dubbo-service</module>
- <module>shenyu-examples-alibaba-dubbo-service</module>
- <module>shenyu-examples-alibaba-dubbo-service-annotation</module>
- <module>shenyu-examples-apache-dubbo-service-annotation</module>
+ <module>shenyu-plugin-dubbo-common</module>
+ <module>shenyu-plugin-alibaba-dubbo</module>
+ <module>shenyu-plugin-apache-dubbo</module>
</modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-dubbo-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
+</project>
\ No newline at end of file
diff --git a/shenyu-plugin/shenyu-plugin-apache-dubbo/pom.xml
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/pom.xml
similarity index 77%
rename from shenyu-plugin/shenyu-plugin-apache-dubbo/pom.xml
rename to shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/pom.xml
index d3b5077..56364a4 100644
--- a/shenyu-plugin/shenyu-plugin-apache-dubbo/pom.xml
+++ b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/pom.xml
@@ -19,12 +19,12 @@
<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.shenyu</groupId>
- <artifactId>shenyu-plugin</artifactId>
+ <artifactId>shenyu-plugin-dubbo</artifactId>
<version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-plugin-apache-dubbo</artifactId>
-
+ <artifactId>shenyu-plugin-alibaba-dubbo</artifactId>
+
<dependencies>
<dependency>
<groupId>org.apache.shenyu</groupId>
@@ -32,12 +32,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-plugin-base</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
+ <groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<scope>provided</scope>
</dependency>
@@ -51,10 +46,5 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-loadbalancer</artifactId>
- <version>${project.version}</version>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
similarity index 86%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
index 6eaf60b..ee163ab 100644
---
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
+++
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
@@ -25,16 +25,14 @@ import org.apache.shenyu.common.constant.Constants;
import org.apache.shenyu.common.dto.MetaData;
import org.apache.shenyu.common.dto.RuleData;
import org.apache.shenyu.common.dto.SelectorData;
-import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.common.enums.ResultEnum;
-import org.apache.shenyu.common.enums.RpcTypeEnum;
import org.apache.shenyu.plugin.alibaba.dubbo.proxy.AlibabaDubboProxyService;
import org.apache.shenyu.plugin.api.ShenyuPluginChain;
import org.apache.shenyu.plugin.api.context.ShenyuContext;
import org.apache.shenyu.plugin.api.result.ShenyuResultEnum;
import org.apache.shenyu.plugin.api.result.ShenyuResultWrap;
import org.apache.shenyu.plugin.api.utils.WebFluxResultUtils;
-import org.apache.shenyu.plugin.base.AbstractShenyuPlugin;
+import org.apache.shenyu.plugin.dubbo.common.AbstractDubboPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
@@ -46,7 +44,7 @@ import java.util.Objects;
/**
* Alibaba dubbo plugin.
*/
-public class AlibabaDubboPlugin extends AbstractShenyuPlugin {
+public class AlibabaDubboPlugin extends AbstractDubboPlugin {
private static final Logger LOG =
LoggerFactory.getLogger(AlibabaDubboPlugin.class);
@@ -108,34 +106,6 @@ public class AlibabaDubboPlugin extends
AbstractShenyuPlugin {
});
}
- /**
- * acquire plugin name.
- *
- * @return plugin name.
- */
- @Override
- public String named() {
- return PluginEnum.DUBBO.getName();
- }
-
- /**
- * plugin is execute.
- *
- * @param exchange the current server exchange
- * @return default false.
- */
- @Override
- public boolean skip(final ServerWebExchange exchange) {
- final ShenyuContext shenyuContext =
exchange.getAttribute(Constants.CONTEXT);
- assert shenyuContext != null;
- return !Objects.equals(shenyuContext.getRpcType(),
RpcTypeEnum.DUBBO.getName());
- }
-
- @Override
- public int getOrder() {
- return PluginEnum.DUBBO.getCode();
- }
-
@Override
protected Mono<Void> handleSelectorIfNull(final String pluginName, final
ServerWebExchange exchange, final ShenyuPluginChain chain) {
return WebFluxResultUtils.noSelectorResult(pluginName, exchange);
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCache.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCache.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCache.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCache.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/AlibabaDubboMetaDataSubscriber.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/AlibabaDubboMetaDataSubscriber.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/AlibabaDubboMetaDataSubscriber.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/AlibabaDubboMetaDataSubscriber.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCacheTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCacheTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCacheTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/ApplicationConfigCacheTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyServiceTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyServiceTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyServiceTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyServiceTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
diff --git a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/pom.xml
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/pom.xml
similarity index 90%
rename from shenyu-plugin/shenyu-plugin-alibaba-dubbo/pom.xml
rename to shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/pom.xml
index 110b479..91678ca 100644
--- a/shenyu-plugin/shenyu-plugin-alibaba-dubbo/pom.xml
+++ b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/pom.xml
@@ -19,31 +19,29 @@
<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.shenyu</groupId>
- <artifactId>shenyu-plugin</artifactId>
+ <artifactId>shenyu-plugin-dubbo</artifactId>
<version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-plugin-alibaba-dubbo</artifactId>
-
+ <artifactId>shenyu-plugin-apache-dubbo</artifactId>
+
<dependencies>
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-plugin-dubbo-common</artifactId>
<version>${project.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-plugin-base</artifactId>
- <version>${project.version}</version>
- </dependency>
-
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-loadbalancer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPlugin.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPlugin.java
similarity index 83%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPlugin.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPlugin.java
index 3e6f60f..2887775 100644
---
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPlugin.java
+++
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPlugin.java
@@ -23,15 +23,13 @@ import org.apache.shenyu.common.constant.Constants;
import org.apache.shenyu.common.dto.MetaData;
import org.apache.shenyu.common.dto.RuleData;
import org.apache.shenyu.common.dto.SelectorData;
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.common.enums.RpcTypeEnum;
import org.apache.shenyu.plugin.apache.dubbo.proxy.ApacheDubboProxyService;
import org.apache.shenyu.plugin.api.ShenyuPluginChain;
import org.apache.shenyu.plugin.api.context.ShenyuContext;
import org.apache.shenyu.plugin.api.result.ShenyuResultEnum;
import org.apache.shenyu.plugin.api.result.ShenyuResultWrap;
import org.apache.shenyu.plugin.api.utils.WebFluxResultUtils;
-import org.apache.shenyu.plugin.base.AbstractShenyuPlugin;
+import org.apache.shenyu.plugin.dubbo.common.AbstractDubboPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
@@ -43,7 +41,7 @@ import java.util.Objects;
/**
* The type Apache dubbo plugin.
*/
-public class ApacheDubboPlugin extends AbstractShenyuPlugin {
+public class ApacheDubboPlugin extends AbstractDubboPlugin {
private static final Logger LOG =
LoggerFactory.getLogger(ApacheDubboPlugin.class);
@@ -82,34 +80,6 @@ public class ApacheDubboPlugin extends AbstractShenyuPlugin {
return result.then(chain.execute(exchange));
}
- /**
- * acquire plugin name.
- *
- * @return plugin name.
- */
- @Override
- public String named() {
- return PluginEnum.DUBBO.getName();
- }
-
- /**
- * plugin is execute.
- *
- * @param exchange the current server exchange
- * @return default false.
- */
- @Override
- public boolean skip(final ServerWebExchange exchange) {
- final ShenyuContext shenyuContext =
exchange.getAttribute(Constants.CONTEXT);
- assert shenyuContext != null;
- return !Objects.equals(shenyuContext.getRpcType(),
RpcTypeEnum.DUBBO.getName());
- }
-
- @Override
- public int getOrder() {
- return PluginEnum.DUBBO.getCode();
- }
-
@Override
protected Mono<Void> handleSelectorIfNull(final String pluginName, final
ServerWebExchange exchange, final ShenyuPluginChain chain) {
return WebFluxResultUtils.noSelectorResult(pluginName, exchange);
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCache.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCache.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCache.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCache.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandler.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandler.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandler.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandler.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboGrayLoadBalance.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboGrayLoadBalance.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboGrayLoadBalance.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboGrayLoadBalance.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriber.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriber.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriber.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriber.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/resources/META-INF/dubbo/org.apache.dubbo.rpc.cluster.LoadBalance
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/resources/META-INF/dubbo/org.apache.dubbo.rpc.cluster.LoadBalance
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/main/resources/META-INF/dubbo/org.apache.dubbo.rpc.cluster.LoadBalance
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/resources/META-INF/dubbo/org.apache.dubbo.rpc.cluster.LoadBalance
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPluginTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPluginTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPluginTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/ApacheDubboPluginTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCacheTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCacheTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCacheTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApplicationConfigCacheTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandlerTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandlerTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandlerTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandlerTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyServiceTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyServiceTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyServiceTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyServiceTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/test/java/org/apache/shenyu/plugin/apache/dubbo/subscriber/ApacheDubboMetaDataSubscriberTest.java
diff --git a/shenyu-plugin/shenyu-plugin-dubbo-common/pom.xml
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/pom.xml
similarity index 93%
rename from shenyu-plugin/shenyu-plugin-dubbo-common/pom.xml
rename to shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/pom.xml
index 296bbe5..415d51c 100644
--- a/shenyu-plugin/shenyu-plugin-dubbo-common/pom.xml
+++ b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/pom.xml
@@ -19,7 +19,7 @@
<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.shenyu</groupId>
- <artifactId>shenyu-plugin</artifactId>
+ <artifactId>shenyu-plugin-dubbo</artifactId>
<version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -28,7 +28,7 @@
<dependencies>
<dependency>
<groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-plugin-api</artifactId>
+ <artifactId>shenyu-plugin-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/AbstractDubboPlugin.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/AbstractDubboPlugin.java
new file mode 100644
index 0000000..07dc11e
--- /dev/null
+++
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/AbstractDubboPlugin.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shenyu.plugin.dubbo.common;
+
+import org.apache.shenyu.common.constant.Constants;
+import org.apache.shenyu.common.enums.PluginEnum;
+import org.apache.shenyu.common.enums.RpcTypeEnum;
+import org.apache.shenyu.plugin.api.context.ShenyuContext;
+import org.apache.shenyu.plugin.base.AbstractShenyuPlugin;
+import org.springframework.web.server.ServerWebExchange;
+
+import java.util.Objects;
+
+/**
+ * AbstractDubboPlugin.
+ */
+public abstract class AbstractDubboPlugin extends AbstractShenyuPlugin {
+
+ /**
+ * return plugin order .
+ * This attribute To determine the plugin execution order in the same type
plugin.
+ *
+ * @return int order
+ */
+ @Override
+ public int getOrder() {
+ return PluginEnum.DUBBO.getCode();
+ }
+
+ /**
+ * acquire plugin name.
+ * this is plugin name define you must Provide the right name.
+ * if you impl AbstractShenyuPlugin this attribute not use.
+ *
+ * @return plugin name.
+ */
+ @Override
+ public String named() {
+ return PluginEnum.DUBBO.getName();
+ }
+
+ /**
+ * plugin is execute.
+ * if return true this plugin can not execute.
+ *
+ * @param exchange the current server exchange
+ * @return default false.
+ */
+ @Override
+ public boolean skip(final ServerWebExchange exchange) {
+ final ShenyuContext shenyuContext =
exchange.getAttribute(Constants.CONTEXT);
+ assert shenyuContext != null;
+ return !Objects.equals(shenyuContext.getRpcType(),
RpcTypeEnum.DUBBO.getName());
+ }
+}
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecorator.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecorator.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecorator.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecorator.java
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveService.java
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceImpl.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceImpl.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceImpl.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceImpl.java
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecoratorTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecoratorTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecoratorTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/context/DubboShenyuContextDecoratorTest.java
diff --git
a/shenyu-plugin/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceTest.java
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceTest.java
similarity index 100%
rename from
shenyu-plugin/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceTest.java
rename to
shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/test/java/org/apache/shenyu/plugin/dubbo/common/param/DubboParamResolveServiceTest.java
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/pom.xml
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/pom.xml
index d186874..fa98155 100644
--- a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/pom.xml
+++ b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/pom.xml
@@ -29,9 +29,6 @@
<modules>
<module>shenyu-spring-boot-starter-plugin-global</module>
<module>shenyu-spring-boot-starter-plugin-divide</module>
- <module>shenyu-spring-boot-starter-plugin-alibaba-dubbo</module>
- <module>shenyu-spring-boot-starter-plugin-apache-dubbo</module>
- <module>shenyu-spring-boot-starter-plugin-dubbo-common</module>
<module>shenyu-spring-boot-starter-plugin-httpclient</module>
<module>shenyu-spring-boot-starter-plugin-springcloud</module>
<module>shenyu-spring-boot-starter-plugin-hystrix</module>
@@ -57,5 +54,6 @@
<module>shenyu-spring-boot-starter-plugin-param-mapping</module>
<module>shenyu-spring-boot-starter-plugin-cryptor</module>
<module>shenyu-spring-boot-starter-plugin-websocket</module>
+ <module>shenyu-spring-boot-starter-plugin-dubbo</module>
</modules>
</project>
diff --git a/shenyu-examples/shenyu-examples-dubbo/pom.xml
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/pom.xml
similarity index 61%
copy from shenyu-examples/shenyu-examples-dubbo/pom.xml
copy to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/pom.xml
index 824289c..99b9227 100644
--- a/shenyu-examples/shenyu-examples-dubbo/pom.xml
+++
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/pom.xml
@@ -20,29 +20,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
+ <artifactId>shenyu-spring-boot-starter-plugin</artifactId>
<groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples</artifactId>
- <version>2.1.0</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-examples-dubbo</artifactId>
+
+ <artifactId>shenyu-spring-boot-starter-plugin-dubbo</artifactId>
<packaging>pom</packaging>
<modules>
- <module>shenyu-examples-dubbo-api</module>
- <module>shenyu-examples-apache-dubbo-service</module>
- <module>shenyu-examples-alibaba-dubbo-service</module>
- <module>shenyu-examples-alibaba-dubbo-service-annotation</module>
- <module>shenyu-examples-apache-dubbo-service-annotation</module>
+ <module>shenyu-spring-boot-starter-plugin-dubbo-common</module>
+ <module>shenyu-spring-boot-starter-plugin-alibaba-dubbo</module>
+ <module>shenyu-spring-boot-starter-plugin-apache-dubbo</module>
</modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-dubbo-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
+</project>
\ No newline at end of file
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/pom.xml
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/pom.xml
similarity index 96%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/pom.xml
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/pom.xml
index f25dc47..3e6da86 100644
---
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/pom.xml
+++
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/pom.xml
@@ -19,7 +19,7 @@
<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.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin</artifactId>
+ <artifactId>shenyu-spring-boot-starter-plugin-dubbo</artifactId>
<version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfiguration.java
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfiguration.java
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfiguration.java
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfiguration.java
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.factories
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.factories
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.factories
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.factories
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.provides
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.provides
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.provides
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/main/resources/META-INF/spring.provides
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfigurationTest.java
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfigurationTest.java
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfigurationTest.java
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/alibaba/dubbo/AlibabaDubboPluginConfigurationTest.java
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/pom.xml
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/pom.xml
similarity index 96%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/pom.xml
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/pom.xml
index 2b2ad90..8ceddc5 100644
---
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/pom.xml
+++
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/pom.xml
@@ -19,7 +19,7 @@
<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.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin</artifactId>
+ <artifactId>shenyu-spring-boot-starter-plugin-dubbo</artifactId>
<version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfiguration.java
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfiguration.java
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfiguration.java
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfiguration.java
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.factories
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.provides
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.provides
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.provides
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/main/resources/META-INF/spring.provides
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfigurationTest.java
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfigurationTest.java
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-apache-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfigurationTest.java
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-apache-dubbo/src/test/java/org/apache/shenyu/springboot/starter/plugin/apache/dubbo/ApacheDubboPluginConfigurationTest.java
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/pom.xml
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/pom.xml
similarity index 95%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/pom.xml
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/pom.xml
index f4b93ab..3fcc960 100644
---
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/pom.xml
+++
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/pom.xml
@@ -19,7 +19,7 @@
<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.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin</artifactId>
+ <artifactId>shenyu-spring-boot-starter-plugin-dubbo</artifactId>
<version>2.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/java/org/apache/shenyu/springboot/plugin/dubbo/common/DubboCommonConfiguration.java
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/java/org/apache/shenyu/springboot/plugin/dubbo/common/DubboCommonConfiguration.java
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/java/org/apache/shenyu/springboot/plugin/dubbo/common/DubboCommonConfiguration.java
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/java/org/apache/shenyu/springboot/plugin/dubbo/common/DubboCommonConfiguration.java
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/resources/META-INF/spring.factories
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/resources/META-INF/spring.factories
similarity index 100%
rename from
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/resources/META-INF/spring.factories
rename to
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-dubbo/shenyu-spring-boot-starter-plugin-dubbo-common/src/main/resources/META-INF/spring.factories