You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by go...@apache.org on 2024/03/19 15:16:15 UTC
(shenyu) branch master updated: Remove Alibaba Dubbo Support #5498 (#5500)
This is an automated email from the ASF dual-hosted git repository.
gongchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new d90f858dd2 Remove Alibaba Dubbo Support #5498 (#5500)
d90f858dd2 is described below
commit d90f858dd230614f9547d185235439dcb7119b1d
Author: aias00 <ro...@163.com>
AuthorDate: Tue Mar 19 23:16:09 2024 +0800
Remove Alibaba Dubbo Support #5498 (#5500)
* Remove Alibaba Dubbo Support #5498
* Remove Alibaba Dubbo Support #5498
---------
Co-authored-by: tomsun28 <to...@outlook.com>
---
.github/workflows/integrated-test-k8s-ingress.yml | 1 -
.github/workflows/integrated-test.yml | 1 -
pom.xml | 18 -
shenyu-bootstrap/pom.xml | 57 ---
shenyu-client/shenyu-client-dubbo/pom.xml | 1 -
.../shenyu-client-alibaba-dubbo/pom.xml | 73 ----
.../dubbo/AlibabaDubboServiceBeanListener.java | 220 ----------
.../alibaba/dubbo/annotation/ShenyuService.java | 441 ---------------------
.../validation/AlibabaDubboClientValidation.java | 33 --
.../validation/AlibabaDubboClientValidator.java | 300 --------------
.../dubbo/com.alibaba.dubbo.validation.Validation | 18 -
.../AlibabaDubboClientValidatorTest.java | 83 ----
.../dubbo/validation/mock/MockConstraint.java | 140 -------
.../validation/mock/MockConstraintValidator.java | 33 --
.../dubbo/validation/mock/MockEnumType.java | 29 --
.../validation/mock/MockValidationParameter.java | 62 ---
.../dubbo/validation/mock/MockValidatorTarget.java | 87 ----
shenyu-examples/shenyu-examples-dubbo/pom.xml | 3 -
.../pom.xml | 125 ------
.../src/main/http/apache-dubbo-class-test-api.http | 191 ---------
.../src/main/http/apache-dubbo-test-api.http | 187 ---------
.../TestAlibabaDubboAnnotationApplication.java | 40 --
.../impl/DubboClassMultiParamServiceImpl.java | 113 ------
.../annotation/impl/DubboClassTestServiceImpl.java | 54 ---
.../impl/DubboMultiParamServiceImpl.java | 102 -----
.../annotation/impl/DubboTestServiceImpl.java | 68 ----
.../src/main/resources/application.yml | 47 ---
.../Dockerfile | 30 --
.../k8s/ingress.yml | 86 ----
.../k8s/shenyu-examples-dubbo.yml | 80 ----
.../k8s/shenyu-zookeeper.yml | 87 ----
.../shenyu-examples-alibaba-dubbo-service/pom.xml | 173 --------
.../src/main/http/apache-dubbo-class-test-api.http | 191 ---------
.../src/main/http/apache-dubbo-test-api.http | 187 ---------
.../dubbo/service/TestAlibabaDubboApplication.java | 40 --
.../impl/DubboClassMultiParamServiceImpl.java | 114 ------
.../service/impl/DubboClassTestServiceImpl.java | 56 ---
.../service/impl/DubboMultiParamServiceImpl.java | 106 -----
.../dubbo/service/impl/DubboTestServiceImpl.java | 68 ----
.../src/main/resources/application.yml | 38 --
.../src/main/resources/spring-dubbo.xml | 40 --
.../pom.xml | 115 ------
.../http/spring-cloud-alibaba-dubbo-test-api.http | 187 ---------
.../dubbo/service/annotation/Application.java | 41 --
.../annotation/impl/MultiParamServiceImpl.java | 106 -----
.../service/annotation/impl/TestServiceImpl.java | 61 ---
.../src/main/resources/application.yml | 50 ---
.../shenyu-examples-sdk-dubbo/pom.xml | 2 -
.../Dockerfile | 29 --
.../pom.xml | 125 ------
.../src/main/http/sdk-alibaba-dubbo-test-api.http | 114 ------
.../ShenyuSdkAlibabaDubboExampleApplication.java | 39 --
.../consumer/api/ShenyuAlibabaDubboClientApi.java | 129 ------
.../ShenyuAlibabaDubboSdkExampleController.java | 141 -------
.../dubbo/consumer/dto/DubboRequestBody.java | 70 ----
.../dubbo/consumer/dto/DubboTestSaveRequest.java | 90 -----
.../impl/ShenyuAlibabaDubboClientApiFallBack.java | 86 ----
.../src/main/resources/application.yml | 56 ---
.../Dockerfile | 30 --
.../pom.xml | 128 ------
.../src/main/http/sdk-alibaba-dubbo-test-api.http | 24 --
.../ShenyuSdkAlibabaDubboProviderApplication.java | 41 --
.../src/main/resources/application.yml | 38 --
.../src/main/resources/spring-dubbo.xml | 40 --
shenyu-integrated-test/pom.xml | 3 -
.../Dockerfile | 29 --
.../docker-compose.yml | 92 -----
.../shenyu-integrated-test-alibaba-dubbo/pom.xml | 137 -------
.../script/healthcheck.sh | 36 --
.../script/services.list | 19 -
.../dubbo/AlibabaDubboIntegrationBootstrap.java | 37 --
.../src/main/resources/application-local.yml | 62 ---
.../src/main/resources/application.yml | 18 -
...babaDubboPluginMultiParamSplicingClassTest.java | 151 -------
.../dubbo/AlibabaDubboPluginMultiParamTest.java | 152 -------
.../AlibabaDubboPluginSharedThreadPoolTest.java | 73 ----
.../dubbo/AlibabaDubboPluginSplicingClassTest.java | 73 ----
.../test/alibaba/dubbo/AlibabaDubboPluginTest.java | 74 ----
.../dubbo/ApacheDubboPluginMultiParamTest.java | 2 +-
.../ApacheDubboPluginSharedThreadPoolTest.java | 2 +-
.../dubbo/ApacheDubboPluginTest.java | 2 +-
.../Dockerfile | 29 --
.../deploy/deploy-shenyu.yaml | 103 -----
.../deploy/kind-config.yaml | 36 --
.../pom.xml | 170 --------
.../script/build_k8s_cluster.sh | 26 --
.../script/healthcheck.sh | 36 --
.../script/services.list | 18 -
...aDubboIngressControllerIntegratedBootstrap.java | 37 --
.../src/main/resources/application.yml | 329 ---------------
.../alibaba/dubbo/AlibabaDubboPluginTest.java | 52 ---
.../Dockerfile | 29 --
.../docker-compose.yml | 111 ------
.../pom.xml | 146 -------
.../script/healthcheck.sh | 36 --
.../script/services.list | 20 -
.../dubbo/SdkAlibabaDubboIntegratedBootstrap.java | 37 --
.../src/main/resources/application.yml | 152 -------
.../test/alibaba/dubbo/ApacheDubboPluginTest.java | 53 ---
.../shenyu-plugin-rpc/shenyu-plugin-dubbo/pom.xml | 1 -
.../shenyu-plugin-alibaba-dubbo/pom.xml | 40 --
.../plugin/alibaba/dubbo/AlibabaDubboPlugin.java | 111 ------
.../dubbo/cache/AlibabaDubboConfigCache.java | 244 ------------
.../dubbo/handler/AlibabaDubboMetaDataHandler.java | 50 ---
.../handler/AlibabaDubboPluginDataHandler.java | 34 --
.../dubbo/proxy/AlibabaDubboGrayLoadBalance.java | 88 ----
.../dubbo/proxy/AlibabaDubboProxyService.java | 88 ----
.../alibaba/dubbo/threadpool/SharedThreadPool.java | 41 --
.../com.alibaba.dubbo.common.threadpool.ThreadPool | 19 -
.../com.alibaba.dubbo.rpc.cluster.LoadBalance | 18 -
.../alibaba/dubbo/AlibabaDubboPluginTest.java | 157 --------
.../dubbo/cache/AlibabaDubboConfigCacheTest.java | 131 ------
.../handler/AlibabaDubboMetaDataHandlerTest.java | 76 ----
.../dubbo/handler/AlibabaDubboPluginDataTest.java | 80 ----
.../proxy/AlibabaDubboGrayLoadBalanceTest.java | 111 ------
.../dubbo/proxy/AlibabaDubboProxyServiceTest.java | 114 ------
.../dubbo/threadpool/SharedThreadPoolTest.java | 67 ----
.../shenyu-spring-boot-starter-client/pom.xml | 1 -
.../pom.xml | 46 ---
.../ShenyuAlibabaDubboClientConfiguration.java | 55 ---
.../src/main/resources/META-INF/spring.factories | 19 -
.../src/main/resources/META-INF/spring.provides | 18 -
.../ShenyuAlibabaDubboClientConfigurationTest.java | 60 ---
.../src/test/resources/application.properties | 31 --
.../pom.xml | 1 -
.../pom.xml | 46 ---
.../dubbo/AlibabaDubboPluginConfiguration.java | 76 ----
.../src/main/resources/META-INF/spring.factories | 19 -
.../src/main/resources/META-INF/spring.provides | 18 -
.../dubbo/AlibabaDubboPluginConfigurationTest.java | 81 ----
130 files changed, 3 insertions(+), 9885 deletions(-)
diff --git a/.github/workflows/integrated-test-k8s-ingress.yml b/.github/workflows/integrated-test-k8s-ingress.yml
index 7fd1a35839..a782e46a6d 100644
--- a/.github/workflows/integrated-test-k8s-ingress.yml
+++ b/.github/workflows/integrated-test-k8s-ingress.yml
@@ -27,7 +27,6 @@ jobs:
matrix:
case:
- shenyu-integrated-test-k8s-ingress-http
- - shenyu-integrated-test-k8s-ingress-alibaba-dubbo
- shenyu-integrated-test-k8s-ingress-apache-dubbo
- shenyu-integrated-test-k8s-ingress-motan
- shenyu-integrated-test-k8s-ingress-spring-cloud
diff --git a/.github/workflows/integrated-test.yml b/.github/workflows/integrated-test.yml
index 59b730519a..2119decd87 100644
--- a/.github/workflows/integrated-test.yml
+++ b/.github/workflows/integrated-test.yml
@@ -26,7 +26,6 @@ jobs:
strategy:
matrix:
case:
- - shenyu-integrated-test-alibaba-dubbo
- shenyu-integrated-test-apache-dubbo
- shenyu-integrated-test-grpc
- shenyu-integrated-test-http
diff --git a/pom.xml b/pom.xml
index ef20790d42..caff8d24f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,7 +118,6 @@
<protostuff.version>1.0.8</protostuff.version>
<kryo.version>4.0.0</kryo.version>
<pagehelper.version>5.3.3</pagehelper.version>
- <alibaba.dubbo.version>2.6.12</alibaba.dubbo.version>
<apache.dubbo.version>3.2.5</apache.dubbo.version>
<gson.version>2.9.0</gson.version>
<okhttp.version>4.9.3</okhttp.version>
@@ -309,23 +308,6 @@
</exclusions>
</dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.dubbo.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
diff --git a/shenyu-bootstrap/pom.xml b/shenyu-bootstrap/pom.xml
index 94529b65d5..d2397f4cc3 100644
--- a/shenyu-bootstrap/pom.xml
+++ b/shenyu-bootstrap/pom.xml
@@ -353,63 +353,6 @@
<!-- Dubbo zookeeper registry dependency end -->
<!-- shenyu apache dubbo plugin end-->
- <!--shenyu alibaba dubbo plugin start-->
- <!-- <dependency>-->
- <!-- <groupId>org.apache.shenyu</groupId>-->
- <!-- <artifactId>shenyu-spring-boot-starter-plugin-alibaba-dubbo</artifactId>-->
- <!-- <version>${project.version}</version>-->
- <!-- </dependency>-->
- <!-- <dependency>-->
- <!-- <groupId>com.alibaba</groupId>-->
- <!-- <artifactId>dubbo</artifactId>-->
- <!-- <version>${alibaba.dubbo.version}</version>-->
- <!-- </dependency>-->
- <!-- <dependency>-->
- <!-- <groupId>org.apache.curator</groupId>-->
- <!-- <artifactId>curator-client</artifactId>-->
- <!-- <version>${curator.version}</version>-->
- <!-- <exclusions>-->
- <!-- <exclusion>-->
- <!-- <artifactId>log4j</artifactId>-->
- <!-- <groupId>log4j</groupId>-->
- <!-- </exclusion>-->
- <!-- </exclusions>-->
- <!-- </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>-->
- <!--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 motan plugin start-->
<!--If you plan to use the motan plugin and want to use the hessian serialization,
please check the sofa plugin related dependencies.In particular, the reliance on sofa-hessian should be excluded.
diff --git a/shenyu-client/shenyu-client-dubbo/pom.xml b/shenyu-client/shenyu-client-dubbo/pom.xml
index 1a36fd220c..10450c0850 100644
--- a/shenyu-client/shenyu-client-dubbo/pom.xml
+++ b/shenyu-client/shenyu-client-dubbo/pom.xml
@@ -28,7 +28,6 @@
<modules>
<module>shenyu-client-dubbo-common</module>
- <module>shenyu-client-alibaba-dubbo</module>
<module>shenyu-client-apache-dubbo</module>
</modules>
</project>
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/pom.xml b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/pom.xml
deleted file mode 100644
index 2dee0d7144..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-client-dubbo</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-client-alibaba-dubbo</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-client-dubbo-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.dubbo.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>5.2.5.Final</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>2.2</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
deleted file mode 100644
index faa17c95f5..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.config.spring.ServiceBean;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener;
-import org.apache.shenyu.client.core.constant.ShenyuClientConstants;
-import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
-import org.apache.shenyu.client.dubbo.common.dto.DubboRpcExt;
-import org.apache.shenyu.common.enums.ApiHttpMethodEnum;
-import org.apache.shenyu.common.enums.RpcTypeEnum;
-import org.apache.shenyu.common.exception.ShenyuException;
-import org.apache.shenyu.common.utils.GsonUtils;
-import org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository;
-import org.apache.shenyu.register.common.config.PropertiesConfig;
-import org.apache.shenyu.register.common.dto.MetaDataRegisterDTO;
-import org.apache.shenyu.register.common.dto.URIRegisterDTO;
-import org.apache.shenyu.register.common.enums.EventType;
-import org.javatuples.Sextet;
-import org.springframework.aop.support.AopUtils;
-import org.springframework.context.ApplicationContext;
-import org.springframework.core.annotation.AnnotatedElementUtils;
-import org.springframework.lang.NonNull;
-import org.springframework.lang.Nullable;
-import org.springframework.util.ReflectionUtils;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
-/**
- * The Alibaba Dubbo ServiceBean Listener.
- */
-@SuppressWarnings("all")
-public class AlibabaDubboServiceBeanListener extends AbstractContextRefreshedEventListener<ServiceBean, ShenyuDubboClient> {
-
- /**
- * Instantiates a new context refreshed event listener.
- *
- * @param clientConfig the shenyu dubbo client config
- * @param shenyuClientRegisterRepository the shenyuClientRegisterRepository
- */
- public AlibabaDubboServiceBeanListener(final PropertiesConfig clientConfig,
- final ShenyuClientRegisterRepository shenyuClientRegisterRepository) {
- super(clientConfig, shenyuClientRegisterRepository);
- }
-
- @Override
- protected Sextet<String[], String, String, ApiHttpMethodEnum[], RpcTypeEnum, String> buildApiDocSextet(final Method method, final Annotation annotation, final Map<String, ServiceBean> beans) {
- ShenyuDubboClient shenyuDubboClient = AnnotatedElementUtils.findMergedAnnotation(method, ShenyuDubboClient.class);
- if (Objects.isNull(shenyuDubboClient)) {
- return null;
- }
- String produce = ShenyuClientConstants.MEDIA_TYPE_ALL_VALUE;
- String consume = ShenyuClientConstants.MEDIA_TYPE_ALL_VALUE;
- String[] values = new String[]{shenyuDubboClient.value()};
- ApiHttpMethodEnum[] apiHttpMethodEnums = new ApiHttpMethodEnum[]{ApiHttpMethodEnum.NOT_HTTP};
- String defaultVersion = "v0.01";
- Class<?> methodClass = method.getDeclaringClass();
- Class<?>[] interfaces = methodClass.getInterfaces();
- for (Class<?> anInterface : interfaces) {
- if (beans.containsKey(anInterface.getName())) {
- ServiceBean<?> serviceBean = beans.get(anInterface.getName());
- defaultVersion = Optional.ofNullable(serviceBean.getVersion()).orElse(defaultVersion);
- }
- }
- return Sextet.with(values, consume, produce, apiHttpMethodEnums, RpcTypeEnum.DUBBO, defaultVersion);
- }
-
- @Override
- protected Map<String, ServiceBean> getBeans(final ApplicationContext context) {
- return context.getBeansOfType(ServiceBean.class);
- }
-
- @Override
- protected Class<?> getCorrectedClass(final ServiceBean bean) {
- Object refProxy = bean.getRef();
- Class<?> clazz = refProxy.getClass();
- if (AopUtils.isAopProxy(refProxy)) {
- clazz = AopUtils.getTargetClass(refProxy);
- }
- return clazz;
- }
-
- @Override
- protected URIRegisterDTO buildURIRegisterDTO(final ApplicationContext context,
- final Map<String, ServiceBean> beans) {
- return beans.entrySet().stream().findFirst().map(entry -> {
- final ServiceBean<?> bean = entry.getValue();
- return URIRegisterDTO.builder()
- .contextPath(getContextPath())
- .appName(buildAppName(bean))
- .rpcType(RpcTypeEnum.DUBBO.getName())
- .eventType(EventType.REGISTER)
- .host(super.getHost())
- .port(Integer.valueOf(getPort()))
- .build();
- }).orElse(null);
- }
-
- private String buildAppName(final ServiceBean<?> serviceBean) {
- String appName = this.getAppName();
- return StringUtils.isBlank(appName) ? serviceBean.getApplication().getName() : appName;
- }
-
- @Override
- protected String buildApiSuperPath(final Class<?> clazz,
- final ShenyuDubboClient beanShenyuClient) {
- if (Objects.nonNull(beanShenyuClient) && !StringUtils.isBlank(beanShenyuClient.path())) {
- return beanShenyuClient.path();
- }
- return "";
- }
-
- @Override
- protected Class<ShenyuDubboClient> getAnnotationType() {
- return ShenyuDubboClient.class;
- }
-
- @Override
- protected void handleClass(final Class<?> clazz,
- final ServiceBean bean,
- @NonNull final ShenyuDubboClient beanShenyuClient,
- final String superPath) {
- Method[] methods = ReflectionUtils.getDeclaredMethods(clazz);
- for (Method method : methods) {
- final MetaDataRegisterDTO metaData = buildMetaDataDTO(bean, beanShenyuClient,
- buildApiPath(method, superPath, null), clazz, method);
- getPublisher().publishEvent(metaData);
- getMetaDataMap().put(method, metaData);
- }
- }
-
- @Override
- protected String buildApiPath(final Method method,
- final String superPath,
- @Nullable final ShenyuDubboClient methodShenyuClient) {
- final String contextPath = this.getContextPath();
- return superPath.contains("*") ? pathJoin(contextPath, superPath.replace("*", ""), method.getName())
- : pathJoin(contextPath, superPath, Objects.requireNonNull(methodShenyuClient).path());
- }
-
- @Override
- protected MetaDataRegisterDTO buildMetaDataDTO(final ServiceBean bean,
- final ShenyuDubboClient shenyuClient,
- final String path,
- final Class<?> clazz,
- final Method method) {
- String appName = buildAppName(bean);
- String desc = shenyuClient.desc();
- String serviceName = bean.getInterface();
- String configRuleName = shenyuClient.ruleName();
- String ruleName = ("".equals(configRuleName)) ? path : configRuleName;
- String methodName = Optional.ofNullable(method).map(Method::getName).orElseThrow(() -> new ShenyuException("unexpected error"));
- Class<?>[] parameterTypesClazz = method.getParameterTypes();
- String parameterTypes = Arrays.stream(parameterTypesClazz).map(Class::getName).collect(Collectors.joining(","));
- return MetaDataRegisterDTO.builder()
- .appName(appName)
- .serviceName(serviceName)
- .methodName(methodName)
- .contextPath(getContextPath())
- .host(super.getHost())
- .port(Integer.valueOf(getPort()))
- .path(path)
- .ruleName(ruleName)
- .pathDesc(desc)
- .parameterTypes(parameterTypes)
- .rpcExt(buildRpcExt(bean))
- .rpcType(RpcTypeEnum.DUBBO.getName())
- .enabled(shenyuClient.enabled())
- .build();
- }
-
- @Override
- public String getPort() {
- final String port = super.getPort();
- return getContext().getBeansOfType(ServiceBean.class).entrySet()
- .stream().findFirst().map(entry -> {
- final ServiceBean<?> serviceBean = entry.getValue();
- return StringUtils.isBlank(port) || "-1".equals(port)
- ? String.valueOf(serviceBean.getProtocol().getPort()) : port;
- }).orElse(port);
- }
-
- private String buildRpcExt(final ServiceBean<?> serviceBean) {
- DubboRpcExt build = DubboRpcExt.builder()
- .protocol(StringUtils.isNotEmpty(serviceBean.getProtocol().getName()) ? serviceBean.getProtocol().getName() : "")
- .group(StringUtils.isNotEmpty(serviceBean.getGroup()) ? serviceBean.getGroup() : "")
- .version(StringUtils.isNotEmpty(serviceBean.getVersion()) ? serviceBean.getVersion() : "")
- .loadbalance(StringUtils.isNotEmpty(serviceBean.getLoadbalance()) ? serviceBean.getLoadbalance() : Constants.DEFAULT_LOADBALANCE)
- .retries(Optional.ofNullable(serviceBean.getRetries()).orElse(Constants.DEFAULT_RETRIES))
- .timeout(Optional.ofNullable(serviceBean.getTimeout()).orElse(Constants.DEFAULT_CONNECT_TIMEOUT))
- .sent(Optional.ofNullable(serviceBean.getSent()).orElse(Boolean.FALSE))
- .cluster(StringUtils.isNotEmpty(serviceBean.getCluster()) ? serviceBean.getCluster() : Constants.DEFAULT_CLUSTER)
- .url("")
- .build();
- return GsonUtils.getInstance().toJson(build);
- }
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/annotation/ShenyuService.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/annotation/ShenyuService.java
deleted file mode 100644
index 89dd9ef871..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/annotation/ShenyuService.java
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.annotation;
-
-import com.alibaba.dubbo.config.annotation.Method;
-import com.alibaba.dubbo.config.annotation.Service;
-import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
-import org.springframework.core.annotation.AliasFor;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-/**
- * The interface shenyu service.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Service
-@Inherited
-@ShenyuDubboClient
-public @interface ShenyuService {
-
- /**
- * Alias for {@link ShenyuDubboClient#value()} .
- *
- * @return the string
- */
- @AliasFor(annotation = ShenyuDubboClient.class)
- String value() default "";
-
- /**
- * Alias for {@link ShenyuDubboClient#path()}.
- *
- * @return the string
- */
- @AliasFor(annotation = ShenyuDubboClient.class)
- String path() default "";
-
- /**
- * Alias for {@link ShenyuDubboClient#ruleName()} .
- *
- * @return the string
- */
- @AliasFor(annotation = ShenyuDubboClient.class)
- String ruleName() default "";
-
- /**
- * Alias for {@link ShenyuDubboClient#desc()} .
- *
- * @return String string
- */
- @AliasFor(annotation = ShenyuDubboClient.class)
- String desc() default "";
-
- /**
- * Alias for {@link ShenyuDubboClient#enabled()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = ShenyuDubboClient.class)
- boolean enabled() default true;
-
- /**
- * Alias for {@link Service#interfaceClass()}.
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- Class<?> interfaceClass() default void.class;
-
- /**
- * Alias for {@link Service#interfaceName()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String interfaceName() default "";
-
- /**
- * Alias for {@link Service#version()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String version() default "";
-
- /**
- * Alias for {@link Service#group()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String group() default "";
-
- /**
- * Alias for {@link Service#path()}.
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class, attribute = "path")
- String dubboPath() default "";
-
- /**
- * Alias for {@link Service#export()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = Service.class)
- boolean export() default false;
-
- /**
- * Alias for {@link Service#token()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String token() default "";
-
- /**
- * Alias for {@link Service#deprecated()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = Service.class)
- boolean deprecated() default false;
-
- /**
- * Alias for {@link Service#dynamic()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = Service.class)
- boolean dynamic() default false;
-
- /**
- * Alias for {@link Service#accesslog()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String accesslog() default "";
-
- /**
- * Alias for {@link Service#executes()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int executes() default 0;
-
- /**
- * Alias for {@link Service#register()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = Service.class)
- boolean register() default false;
-
- /**
- * Alias for {@link Service#weight()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int weight() default 0;
-
- /**
- * Alias for {@link Service#document()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String document() default "";
-
- /**
- * Alias for {@link Service#delay()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int delay() default 0;
-
- /**
- * Alias for {@link Service#local()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String local() default "";
-
- /**
- * Alias for {@link Service#stub()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String stub() default "";
-
- /**
- * Alias for {@link Service#cluster()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String cluster() default "";
-
- /**
- * Alias for {@link Service#proxy()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String proxy() default "";
-
- /**
- * Alias for {@link Service#connections()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int connections() default 0;
-
- /**
- * Alias for {@link Service#callbacks()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int callbacks() default 0;
-
- /**
- * Alias for {@link Service#onconnect()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String onconnect() default "";
-
- /**
- * Alias for {@link Service#ondisconnect()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String ondisconnect() default "";
-
- /**
- * Alias for {@link Service#owner()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String owner() default "";
-
- /**
- * Alias for {@link Service#layer()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String layer() default "";
-
- /**
- *Alias for {@link Service#retries()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int retries() default 0;
-
- /**
- * Alias for {@link Service#loadbalance()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String loadbalance() default "";
-
- /**
- * Alias for {@link Service#async()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = Service.class)
- boolean async() default false;
-
- /**
- * Alias for {@link Service#actives()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int actives() default 0;
-
- /**
- * Alias for {@link Service#sent()} .
- *
- * @return the boolean
- */
- @AliasFor(annotation = Service.class)
- boolean sent() default false;
-
- /**
- * Alias for {@link Service#mock()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String mock() default "";
-
- /**
- * Alias for {@link Service#validation()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String validation() default "";
-
- /**
- * Alias for {@link Service#timeout()} .
- *
- * @return the int
- */
- @AliasFor(annotation = Service.class)
- int timeout() default 0;
-
- /**
- * Alias for {@link Service#cache()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String cache() default "";
-
- /**
- * Alias for {@link Service#filter()} .
- *
- * @return the string[]
- */
- @AliasFor(annotation = Service.class)
- String[] filter() default {};
-
- /**
- * Alias for {@link Service#listener()} .
- *
- * @return the string[]
- */
- @AliasFor(annotation = Service.class)
- String[] listener() default {};
-
- /**
- * Alias for {@link Service#parameters()} .
- *
- * @return the string[]
- */
- @AliasFor(annotation = Service.class)
- String[] parameters() default {};
-
- /**
- * Alias for {@link Service#application()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String application() default "";
-
- /**
- * Alias for {@link Service#module()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String module() default "";
-
- /**
- * Alias for {@link Service#provider()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String provider() default "";
-
- /**
- * Alias for {@link Service#protocol()} .
- *
- * @return the string[]
- */
- @AliasFor(annotation = Service.class)
- String[] protocol() default {};
-
- /**
- * Alias for {@link Service#monitor()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String monitor() default "";
-
- /**
- * Alias for {@link Service#registry()} .
- *
- * @return the string[]
- */
- @AliasFor(annotation = Service.class)
- String[] registry() default {};
-
- /**
- * Alias for {@link Service#tag()} .
- *
- * @return the string
- */
- @AliasFor(annotation = Service.class)
- String tag() default "";
-
- /**
- * Alias for {@link Service#methods()} .
- *
- * @return the Method[]
- */
- @AliasFor(annotation = Service.class)
- Method[] methods() default {};
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidation.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidation.java
deleted file mode 100644
index a4c934a3c5..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidation.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation;
-
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.validation.Validation;
-import com.alibaba.dubbo.validation.Validator;
-
-/**
- * The type Alibaba dubbo client validation.
- */
-public class AlibabaDubboClientValidation implements Validation {
-
- @Override
- public Validator getValidator(final URL url) {
- return new AlibabaDubboClientValidator(url);
- }
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java
deleted file mode 100644
index 96502c3daa..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidator.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation;
-
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.bytecode.ClassGenerator;
-import com.alibaba.dubbo.common.utils.ReflectUtils;
-import com.alibaba.dubbo.validation.MethodValidated;
-import com.alibaba.dubbo.validation.Validator;
-import java.util.Objects;
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.CtField;
-import javassist.CtNewConstructor;
-import javassist.Modifier;
-import javassist.NotFoundException;
-import javassist.bytecode.AnnotationsAttribute;
-import javassist.bytecode.ClassFile;
-import javassist.bytecode.ConstPool;
-import javassist.bytecode.annotation.ArrayMemberValue;
-import javassist.bytecode.annotation.BooleanMemberValue;
-import javassist.bytecode.annotation.ByteMemberValue;
-import javassist.bytecode.annotation.CharMemberValue;
-import javassist.bytecode.annotation.ClassMemberValue;
-import javassist.bytecode.annotation.DoubleMemberValue;
-import javassist.bytecode.annotation.EnumMemberValue;
-import javassist.bytecode.annotation.FloatMemberValue;
-import javassist.bytecode.annotation.IntegerMemberValue;
-import javassist.bytecode.annotation.LongMemberValue;
-import javassist.bytecode.annotation.MemberValue;
-import javassist.bytecode.annotation.ShortMemberValue;
-import javassist.bytecode.annotation.StringMemberValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.validation.Constraint;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.ValidationException;
-import javax.validation.ValidatorFactory;
-import javax.validation.groups.Default;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * The type Alibaba dubbo client validator.
- */
-public class AlibabaDubboClientValidator implements Validator {
-
- private static final Logger LOG = LoggerFactory.getLogger(AlibabaDubboClientValidator.class);
-
- private final Class<?> clazz;
-
- private final javax.validation.Validator validator;
-
- /**
- * Instantiates a new Alibaba dubbo client validator.
- *
- * @param url the url
- */
- @SuppressWarnings({"unchecked", "rawtypes"})
- public AlibabaDubboClientValidator(final URL url) {
- this.clazz = ReflectUtils.forName(url.getServiceInterface());
- String shenyuValidation = url.getParameter("shenyuValidation");
- ValidatorFactory factory;
- if (Objects.nonNull(shenyuValidation) && shenyuValidation.length() > 0) {
- factory = Validation.byProvider((Class) ReflectUtils.forName(shenyuValidation)).configure().buildValidatorFactory();
- } else {
- factory = Validation.buildDefaultValidatorFactory();
- }
- this.validator = factory.getValidator();
- }
-
- private static boolean isPrimitives(final Class<?> cls) {
- if (cls.isArray()) {
- return isPrimitive(cls.getComponentType());
- }
- return isPrimitive(cls);
- }
-
- private static boolean isPrimitive(final Class<?> cls) {
- return cls.isPrimitive() || cls == String.class || cls == Boolean.class || cls == Character.class
- || Number.class.isAssignableFrom(cls) || Date.class.isAssignableFrom(cls);
- }
-
- private static Object getMethodParameterBean(final Class<?> clazz, final Method method, final Object[] args) {
- if (!hasConstraintParameter(method)) {
- return null;
- }
- try {
- String parameterClassName = generateMethodParameterClassName(clazz, method);
- Class<?> parameterClass;
- try {
- parameterClass = Class.forName(parameterClassName, true, clazz.getClassLoader());
- } catch (ClassNotFoundException e) {
- ClassPool pool = ClassGenerator.getClassPool(clazz.getClassLoader());
- CtClass ctClass = pool.makeClass(parameterClassName);
- ClassFile classFile = ctClass.getClassFile();
- classFile.setVersionToJava5();
- ctClass.addConstructor(CtNewConstructor.defaultConstructor(pool.getCtClass(parameterClassName)));
- // parameter fields
- Class<?>[] parameterTypes = method.getParameterTypes();
- Annotation[][] parameterAnnotations = method.getParameterAnnotations();
- for (int i = 0; i < parameterTypes.length; i++) {
- Class<?> type = parameterTypes[i];
- Annotation[] annotations = parameterAnnotations[i];
- AnnotationsAttribute attribute = new AnnotationsAttribute(classFile.getConstPool(), AnnotationsAttribute.visibleTag);
- for (Annotation annotation : annotations) {
- if (annotation.annotationType().isAnnotationPresent(Constraint.class)) {
- javassist.bytecode.annotation.Annotation ja = new javassist.bytecode.annotation.Annotation(
- classFile.getConstPool(), pool.getCtClass(annotation.annotationType().getName()));
- Method[] members = annotation.annotationType().getMethods();
- for (Method member : members) {
- if (Modifier.isPublic(member.getModifiers())
- && member.getParameterTypes().length == 0
- && member.getDeclaringClass() == annotation.annotationType()) {
- Object value = member.invoke(annotation);
- if (null != value) {
- MemberValue memberValue = createMemberValue(
- classFile.getConstPool(), pool.get(member.getReturnType().getName()), value);
- ja.addMemberValue(member.getName(), memberValue);
- }
- }
- }
- attribute.addAnnotation(ja);
- }
- }
- String fieldName = method.getName() + "Argument" + i;
- CtField ctField = CtField.make("public " + type.getCanonicalName() + " " + fieldName + ";", pool.getCtClass(parameterClassName));
- ctField.getFieldInfo().addAttribute(attribute);
- ctClass.addField(ctField);
- }
- parameterClass = ctClass.toClass(clazz.getClassLoader(), null);
- }
- Object parameterBean = parameterClass.newInstance();
- for (int i = 0; i < args.length; i++) {
- Field field = parameterClass.getField(method.getName() + "Argument" + i);
- field.set(parameterBean, args[i]);
- }
- return parameterBean;
- } catch (Exception e) {
- LOG.warn(e.getMessage(), e);
- return null;
- }
- }
-
- private static String generateMethodParameterClassName(final Class<?> clazz, final Method method) {
- StringBuilder builder = new StringBuilder().append(clazz.getName())
- .append("_")
- .append(toUpperMethodName(method.getName()))
- .append("Parameter");
-
- Class<?>[] parameterTypes = method.getParameterTypes();
- for (Class<?> parameterType : parameterTypes) {
- builder.append("_").append(parameterType.getName());
- }
-
- return builder.toString();
- }
-
- private static boolean hasConstraintParameter(final Method method) {
- Annotation[][] parameterAnnotations = method.getParameterAnnotations();
- for (Annotation[] annotations : parameterAnnotations) {
- for (Annotation annotation : annotations) {
- if (annotation.annotationType().isAnnotationPresent(Constraint.class)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private static String toUpperMethodName(final String methodName) {
- return methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
- }
-
- // Copy from javassist.bytecode.annotation.Annotation.createMemberValue(ConstPool, CtClass);
- private static MemberValue createMemberValue(final ConstPool cp, final CtClass type, final Object value) throws NotFoundException {
- MemberValue memberValue = javassist.bytecode.annotation.Annotation.createMemberValue(cp, type);
- if (memberValue instanceof BooleanMemberValue) {
- ((BooleanMemberValue) memberValue).setValue((Boolean) value);
- } else if (memberValue instanceof ByteMemberValue) {
- ((ByteMemberValue) memberValue).setValue((Byte) value);
- } else if (memberValue instanceof CharMemberValue) {
- ((CharMemberValue) memberValue).setValue((Character) value);
- } else if (memberValue instanceof ShortMemberValue) {
- ((ShortMemberValue) memberValue).setValue((Short) value);
- } else if (memberValue instanceof IntegerMemberValue) {
- ((IntegerMemberValue) memberValue).setValue((Integer) value);
- } else if (memberValue instanceof LongMemberValue) {
- ((LongMemberValue) memberValue).setValue((Long) value);
- } else if (memberValue instanceof FloatMemberValue) {
- ((FloatMemberValue) memberValue).setValue((Float) value);
- } else if (memberValue instanceof DoubleMemberValue) {
- ((DoubleMemberValue) memberValue).setValue((Double) value);
- } else if (memberValue instanceof ClassMemberValue) {
- ((ClassMemberValue) memberValue).setValue(((Class<?>) value).getName());
- } else if (memberValue instanceof StringMemberValue) {
- ((StringMemberValue) memberValue).setValue((String) value);
- } else if (memberValue instanceof EnumMemberValue) {
- ((EnumMemberValue) memberValue).setValue(((Enum<?>) value).name());
- /* else if (memberValue instanceof AnnotationMemberValue) */
- } else if (memberValue instanceof ArrayMemberValue) {
- CtClass arrayType = type.getComponentType();
- int len = Array.getLength(value);
- MemberValue[] members = new MemberValue[len];
- for (int i = 0; i < len; i++) {
- members[i] = createMemberValue(cp, arrayType, Array.get(value, i));
- }
- ((ArrayMemberValue) memberValue).setValue(members);
- }
- return memberValue;
- }
-
- @Override
- public void validate(final String methodName, final Class<?>[] parameterTypes, final Object[] arguments) throws Exception {
- List<Class<?>> groups = new ArrayList<>();
- String methodClassName = clazz.getName() + "$" + toUpperMethodName(methodName);
- try {
- Class<?> methodClass = Class.forName(methodClassName, false, Thread.currentThread().getContextClassLoader());
- groups.add(methodClass);
- } catch (ClassNotFoundException e) {
- LOG.error(e.getMessage(), e);
- }
- Set<ConstraintViolation<?>> violations = new HashSet<>();
- Method method = clazz.getMethod(methodName, parameterTypes);
- if (method.isAnnotationPresent(MethodValidated.class)) {
- Class<?>[] methodClasses = method.getAnnotation(MethodValidated.class).value();
- groups.addAll(Arrays.asList(methodClasses));
- }
- // add into default group
- groups.add(0, Default.class);
- groups.add(1, clazz);
-
- // convert list to array
- Class<?>[] classGroups = groups.toArray(new Class<?>[0]);
-
- Object parameterBean = getMethodParameterBean(clazz, method, arguments);
- if (Objects.nonNull(parameterBean)) {
- violations.addAll(validator.validate(parameterBean, classGroups));
- }
-
- for (Object arg : arguments) {
- validate(violations, arg, classGroups);
- }
-
- if (!violations.isEmpty()) {
- LOG.error("Failed to validate service: " + clazz.getName() + ", method: " + methodName + ", cause: " + violations);
- StringBuilder validateError = new StringBuilder();
- violations.forEach(each -> validateError.append(each.getMessage()).append(","));
- throw new ValidationException(validateError.substring(0, validateError.length() - 1));
- }
- }
-
- private void validate(final Set<ConstraintViolation<?>> violations, final Object arg, final Class<?>... groups) {
- if (Objects.nonNull(arg) && !isPrimitives(arg.getClass())) {
- if (arg instanceof Object[]) {
- for (Object item : (Object[]) arg) {
- validate(violations, item, groups);
- }
- } else if (arg instanceof Collection) {
- for (Object item : (Collection<?>) arg) {
- validate(violations, item, groups);
- }
- } else if (arg instanceof Map) {
- for (Map.Entry<?, ?> entry : ((Map<?, ?>) arg).entrySet()) {
- validate(violations, entry.getKey(), groups);
- validate(violations, entry.getValue(), groups);
- }
- } else {
- violations.addAll(validator.validate(arg, groups));
- }
- }
- }
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.validation.Validation b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.validation.Validation
deleted file mode 100644
index 783db63f6a..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.validation.Validation
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-shenyuValidation=org.apache.shenyu.client.alibaba.dubbo.validation.AlibabaDubboClientValidation
\ No newline at end of file
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidatorTest.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidatorTest.java
deleted file mode 100644
index 4b1feac776..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/AlibabaDubboClientValidatorTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation;
-
-import com.alibaba.dubbo.common.URL;
-import org.apache.shenyu.client.alibaba.dubbo.validation.mock.MockValidationParameter;
-import org.junit.jupiter.api.Test;
-
-import javax.validation.ValidationException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-/**
- * Test case for {@link AlibabaDubboClientValidation}.
- */
-public final class AlibabaDubboClientValidatorTest {
-
- private static final String MOCK_SERVICE_URL =
- "mock://test:28000/org.apache.shenyu.client.alibaba.dubbo.validation.mock.MockValidatorTarget";
-
- @Test
- public void testItWithNonExistMethod() throws Exception {
- final URL url = URL.valueOf(MOCK_SERVICE_URL);
- assertThrows(NoSuchMethodException.class, () -> new AlibabaDubboClientValidation().getValidator(url)
- .validate("nonExistingMethod", new Class<?>[]{String.class}, new Object[]{"arg1"}));
-
- }
-
- @Test
- public void testItWithExistMethod() throws Exception {
- final URL url = URL.valueOf(MOCK_SERVICE_URL + "?shenyuValidation=org.hibernate.validator.HibernateValidator");
- new AlibabaDubboClientValidation().getValidator(url)
- .validate("method1", new Class<?>[]{String.class}, new Object[]{"anything"});
- }
-
- @Test
- public void testValidateWhenMeetsConstraintThenValidationFailed() throws Exception {
- final URL url = URL.valueOf(MOCK_SERVICE_URL);
- assertThrows(ValidationException.class, () -> new AlibabaDubboClientValidation().getValidator(url)
- .validate("method2", new Class<?>[]{MockValidationParameter.class}, new Object[]{new MockValidationParameter("NotBeNull")}));
- }
-
- @Test
- public void testItWithArrayArg() throws Exception {
- final URL url = URL.valueOf(MOCK_SERVICE_URL);
- new AlibabaDubboClientValidation().getValidator(url)
- .validate("method3", new Class<?>[]{MockValidationParameter[].class}, new Object[]{new MockValidationParameter[]{new MockValidationParameter("parameter")}});
- }
-
- @Test
- public void testItWithCollectionArg() throws Exception {
- URL url = URL.valueOf(MOCK_SERVICE_URL);
- new AlibabaDubboClientValidation().getValidator(url)
- .validate("method4", new Class<?>[]{List.class}, new Object[]{Collections.singletonList("parameter")});
- }
-
- @Test
- public void testItWithMapArg() throws Exception {
- final URL url = URL.valueOf(MOCK_SERVICE_URL);
- final Map<String, String> map = new HashMap<>();
- map.put("key", "value");
- new AlibabaDubboClientValidation().getValidator(url).validate("method5", new Class<?>[]{Map.class}, new Object[]{map});
- }
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockConstraint.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockConstraint.java
deleted file mode 100644
index fd5cacd85a..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockConstraint.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation.mock;
-
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE_USE;
-
-/**
- * MockConstraint.
- */
-@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@Constraint(validatedBy = MockConstraintValidator.class)
-public @interface MockConstraint {
-
- /**
- * mock message parameter.
- *
- * @return the mock value
- */
- String message() default "{message}";
-
- /**
- * mock class array parameter.
- *
- * @return the mock value
- */
- Class<?>[] groups() default {};
-
- /**
- * constraint required payload.
- *
- * @return the payload value
- */
- Class<? extends Payload>[] payload() default {};
-
- /**
- * mock byte parameter.
- *
- * @return the mock value
- */
- byte mpByte() default '1';
-
- /**
- * mock short parameter.
- *
- * @return the mock value
- */
- short mpShort() default 1;
-
- /**
- * mock char parameter.
- *
- * @return the mock value
- */
- char mpChar() default ' ';
-
- /**
- * mock int parameter.
- *
- * @return the mock value
- */
- int mpInteger() default 0;
-
- /**
- * mock class parameter.
- *
- * @return the mock value
- */
- Class<?> mpClass() default Object.class;
-
- /**
- * mock class parameter.
- *
- * @return the mock value
- */
- MockEnumType mpEnum() default MockEnumType.MEMBER;
-
- /**
- * mock boolean parameter.
- *
- * @return the mock value
- */
- boolean mpBool() default false;
-
- /**
- * mock long parameter.
- *
- * @return the mock value
- */
- long mpLong() default 0;
-
- /**
- * mock float parameter.
- *
- * @return the mock value
- */
- float mpFloat() default 0;
-
- /**
- * mock double parameter.
- *
- * @return the mock value
- */
- double mpDouble() default 0;
-
- /**
- * mock object array parameter.
- *
- * @return the mock value
- */
- Class<?>[] mpClassArray() default {Object.class};
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockConstraintValidator.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockConstraintValidator.java
deleted file mode 100644
index c329745fe0..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockConstraintValidator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation.mock;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * MockConstraintValidator.
- */
-public class MockConstraintValidator implements ConstraintValidator<MockConstraint, Object> {
-
- @Override
- public boolean isValid(final Object value, final ConstraintValidatorContext context) {
- // mock return
- return false;
- }
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockEnumType.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockEnumType.java
deleted file mode 100644
index e9f89f0d91..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockEnumType.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation.mock;
-
-/**
- * Mock Enum Type.
- */
-public enum MockEnumType {
-
- /**
- * Member mock enum type.
- */
- MEMBER
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java
deleted file mode 100644
index 514736f179..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidationParameter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation.mock;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * Mock ValidationParameter.
- */
-public class MockValidationParameter {
-
- @NotNull
- private String stringParameter;
-
- /**
- * constructor without parameter.
- */
- public MockValidationParameter() {
- }
-
- /**
- * constructor with parameter.
- *
- * @param stringParameter the String parameter.
- */
- public MockValidationParameter(final String stringParameter) {
- this.stringParameter = stringParameter;
- }
-
- /**
- * get StringParameter.
- *
- * @return stringParameter
- */
- public String getStringParameter() {
- return stringParameter;
- }
-
- /**
- * set stringParameter.
- *
- * @param stringParameter the String parameter.
- */
- public void setStringParameter(final String stringParameter) {
- this.stringParameter = stringParameter;
- }
-}
diff --git a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidatorTarget.java b/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidatorTarget.java
deleted file mode 100644
index aa0d5ade15..0000000000
--- a/shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/test/java/org/apache/shenyu/client/alibaba/dubbo/validation/mock/MockValidatorTarget.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.client.alibaba.dubbo.validation.mock;
-
-import com.alibaba.dubbo.validation.MethodValidated;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Mock Validator Target.
- */
-public interface MockValidatorTarget {
-
- /**
- * mock method: method1.
- *
- * @param anything parameter
- */
- @MethodValidated
- void method1(String anything);
-
- /**
- * mock method: method2.
- *
- * @param mockValidationParameter parameter
- */
- @MethodValidated
- void method2(@NotNull @MockConstraint MockValidationParameter mockValidationParameter);
-
- /**
- * mock method: method3.
- *
- * @param parameters parameter
- */
- void method3(MockValidationParameter[] parameters);
-
- /**
- * mock method: method4.
- *
- * @param strings parameter
- */
- void method4(List<String> strings);
-
- /**
- * mock method: method5.
- *
- * @param map parameter
- */
- void method5(Map<String, String> map);
-
- interface Method1 {
-
- }
-
- interface Method2 {
-
- }
-
- interface Method3 {
-
- }
-
- interface Method4 {
-
- }
-
- interface Method5 {
-
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/pom.xml b/shenyu-examples/shenyu-examples-dubbo/pom.xml
index 0bc5a39fe1..e202ca817f 100644
--- a/shenyu-examples/shenyu-examples-dubbo/pom.xml
+++ b/shenyu-examples/shenyu-examples-dubbo/pom.xml
@@ -31,10 +31,7 @@
<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-examples-spring-cloud-alibaba-dubbo-service-annotation</module>
<module>shenyu-examples-apache-dubbo-service-xml</module>
</modules>
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
deleted file mode 100644
index 25a8abd9a4..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>shenyu-examples-dubbo</artifactId>
- <groupId>org.apache.shenyu</groupId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>shenyu-examples-alibaba-dubbo-service-annotation</artifactId>
-
- <properties>
- <curator.version>4.0.1</curator.version>
- <alibaba.dubbo.version>2.6.12</alibaba.dubbo.version>
- <zookeeper.version>3.7.2</zookeeper.version>
- <alibaba.spring.version>1.0.5</alibaba.spring.version>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-client-alibaba-dubbo</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-dubbo-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-common</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-autoconfigure</artifactId>
- </dependency>
-
- <!-- Dubbo dependency -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.dubbo.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.spring</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${alibaba.spring.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>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-class-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-class-test-api.http
deleted file mode 100644
index 0236a62582..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-class-test-api.http
+++ /dev/null
@@ -1,191 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### shengyu getway proxy orderSave
-POST http://localhost:9195/dubbo/demo/findById
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123"
-}
-
-### shengyu getway proxy findAll
-GET http://localhost:9195/dubbo/demo/findAll
-Accept: application/json
-
-
-### shengyu getway proxy insert
-POST http://localhost:9195/dubbo/demo/insert
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123",
- "name": "test"
-}
-
-### shengyu getway proxy findList
-GET http://localhost:9195/dubbo/demo/findList
-Accept: application/json
-
-### shengyu getway proxy findByIdsAndName
-GET http://localhost:9195/dubbo/demo/findByIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByArrayIdsAndName
-GET http://localhost:9195/dubbo/demo/findByArrayIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByStringArray
-GET http://localhost:9195/dubbo/demo/findByStringArray
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- "123",
- "124",
- "125"
- ]
-}
-
-### shengyu getway proxy findByListId
-GET http://localhost:9195/dubbo/demo/findByListId
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ]
-}
-
-### shengyu getway proxy batchSave
-PUT http://localhost:9195/dubbo/demo/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/dubbo/demo/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/dubbo/demo/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/dubbo/demo/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-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-test-api.http
deleted file mode 100644
index afe37b62e6..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/http/apache-dubbo-test-api.http
+++ /dev/null
@@ -1,187 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### shengyu getway proxy orderSave
-POST http://localhost:9195/dubbo/findById
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123"
-}
-
-### shengyu getway proxy findAll
-GET http://localhost:9195/dubbo/findAll
-Accept: application/json
-
-
-### shengyu getway proxy insert
-POST http://localhost:9195/dubbo/insert
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123",
- "name": "test"
-}
-
-### shengyu getway proxy findByIdsAndName
-GET http://localhost:9195/dubbo/findByIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByArrayIdsAndName
-GET http://localhost:9195/dubbo/findByArrayIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByStringArray
-GET http://localhost:9195/dubbo/findByStringArray
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- "123",
- "124",
- "125"
- ]
-}
-
-### shengyu getway proxy findByListId
-GET http://localhost:9195/dubbo/findByListId
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ]
-}
-
-### shengyu getway proxy batchSave
-PUT http://localhost:9195/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/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/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/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-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/TestAlibabaDubboAnnotationApplication.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/TestAlibabaDubboAnnotationApplication.java
deleted file mode 100644
index 16393ee4ff..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/TestAlibabaDubboAnnotationApplication.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.annotation;
-
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * TestDubboApplication.
- */
-@SpringBootApplication
-@EnableDubbo
-public class TestAlibabaDubboAnnotationApplication {
-
- /**
- * Main Entrance.
- *
- * @param args startup arguments
- */
- public static void main(final String[] args) {
- SpringApplication.run(TestAlibabaDubboAnnotationApplication.class, args);
- }
-
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboClassMultiParamServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboClassMultiParamServiceImpl.java
deleted file mode 100644
index b30ecb9a1a..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboClassMultiParamServiceImpl.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.annotation.impl;
-
-import org.apache.shenyu.client.alibaba.dubbo.annotation.ShenyuService;
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-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.DubboClassMultiParamService;
-import org.springframework.lang.NonNull;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * The type Dubbo multi param service.
- */
-@ShenyuService("/demo")
-@ApiModule(value = "demo")
-public class DubboClassMultiParamServiceImpl implements DubboClassMultiParamService {
-
- @Override
- @ShenyuDubboClient("/findByIdsAndName")
- @ApiDoc(desc = "findByIdsAndName")
- public DubboTest findByIdsAndName(final List<Integer> ids, final String name) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByArrayIdsAndName")
- @ApiDoc(desc = "findByArrayIdsAndName")
- public DubboTest findByArrayIdsAndName(final Integer[] ids, final String name) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByArrayIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByStringArray")
- @ApiDoc(desc = "findByStringArray")
- public DubboTest findByStringArray(final String[] ids) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByStringArray");
- }
-
- @Override
- @ShenyuDubboClient("/findByListId")
- @ApiDoc(desc = "findByListId")
- public DubboTest findByListId(final List<String> ids) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByListId");
- }
-
- @Override
- @ShenyuDubboClient("/batchSave")
- @ApiDoc(desc = "batchSave")
- public DubboTest batchSave(final List<DubboTest> dubboTestList) {
- return new DubboTest(join(dubboTestList, DubboTest::getId),
- "hello world shenyu alibaba dubbo param batchSave :" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/batchSaveAndNameAndId")
- @ApiDoc(desc = "batchSaveAndNameAndId")
- public DubboTest batchSaveAndNameAndId(final List<DubboTest> dubboTestList, final String id, final String name) {
- return new DubboTest(id, "hello world shenyu alibaba dubbo param batchSaveAndNameAndId :"
- + name + ":" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTest")
- @ApiDoc(desc = "saveComplexBeanTest")
- public DubboTest saveComplexBeanTest(final ComplexBeanTest complexBeanTest) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTest :" + complexBeanTest.getDubboTest().getName());
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTestAndName")
- @ApiDoc(desc = "saveComplexBeanTestAndName")
- public DubboTest saveComplexBeanTestAndName(final ComplexBeanTest complexBeanTest, final String name) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :" + complexBeanTest.getDubboTest().getName() + "-" + name);
- }
-
- @Override
- @ShenyuDubboClient("/bigRequestBody")
- @ApiDoc(desc = "bigRequestBody")
- public DubboTest saveBigRequestBody(final DubboTest dubboTest) {
- return dubboTest;
- }
-
- private <T> String join(final @NonNull List<T> list, final Function<T, String> mapper) {
- return list.stream()
- .map(mapper)
- .collect(Collectors.joining("-"));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboClassTestServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboClassTestServiceImpl.java
deleted file mode 100644
index 3f3a031cc8..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboClassTestServiceImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.annotation.impl;
-
-import org.apache.shenyu.client.alibaba.dubbo.annotation.ShenyuService;
-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.DubboClassTestService;
-
-import java.util.Collections;
-import java.util.Random;
-
-/**
- * The type Dubbo service.
- */
-@ShenyuService("/demo/**")
-public class DubboClassTestServiceImpl implements DubboClassTestService {
-
- @Override
- public DubboTest findById(final String id) {
- return new DubboTest(id, "hello world shenyu Alibaba Dubbo, findById");
- }
-
- @Override
- public DubboTest findAll() {
- return new DubboTest(String.valueOf(new Random().nextInt()), "hello world shenyu Alibaba Dubbo , findAll");
- }
-
- @Override
- public DubboTest insert(final DubboTest dubboTest) {
- dubboTest.setName("hello world shenyu Alibaba Dubbo: " + dubboTest.getName());
- return dubboTest;
- }
-
- @Override
- public ListResp findList() {
- return new ListResp(1, Collections.singletonList(new DubboTest("1", "test")));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java
deleted file mode 100644
index 607e6c8a3b..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.annotation.impl;
-
-import com.alibaba.dubbo.config.annotation.Service;
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-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 org.springframework.lang.NonNull;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * The type Dubbo multi param service.
- */
-@Service
-@ApiModule(value = "dubboMultiParamService")
-public class DubboMultiParamServiceImpl implements DubboMultiParamService {
-
- @Override
- @ShenyuDubboClient("/findByIdsAndName")
- @ApiDoc(desc = "findByIdsAndName")
- public DubboTest findByIdsAndName(final List<Integer> ids, final String name) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByArrayIdsAndName")
- @ApiDoc(desc = "findByArrayIdsAndName")
- public DubboTest findByArrayIdsAndName(final Integer[] ids, final String name) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByArrayIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByStringArray")
- @ApiDoc(desc = "findByStringArray")
- public DubboTest findByStringArray(final String[] ids) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByStringArray");
- }
-
- @Override
- @ShenyuDubboClient("/findByListId")
- @ApiDoc(desc = "findByListId")
- public DubboTest findByListId(final List<String> ids) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByListId");
- }
-
- @Override
- @ShenyuDubboClient("/batchSave")
- @ApiDoc(desc = "batchSave")
- public DubboTest batchSave(final List<DubboTest> dubboTestList) {
- return new DubboTest(join(dubboTestList, DubboTest::getId), "hello world shenyu alibaba dubbo param batchSave :" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/batchSaveAndNameAndId")
- @ApiDoc(desc = "batchSaveAndNameAndId")
- public DubboTest batchSaveAndNameAndId(final List<DubboTest> dubboTestList, final String id, final String name) {
- return new DubboTest(id, "hello world shenyu alibaba dubbo param batchSaveAndNameAndId :" + name + ":" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTest")
- @ApiDoc(desc = "saveComplexBeanTest")
- public DubboTest saveComplexBeanTest(final ComplexBeanTest complexBeanTest) {
- return new DubboTest(complexBeanTest.getIdLists().toString(), "hello world shenyu alibaba dubbo param saveComplexBeanTest :" + complexBeanTest.getDubboTest().getName());
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTestAndName")
- @ApiDoc(desc = "saveComplexBeanTestAndName")
- public DubboTest saveComplexBeanTestAndName(final ComplexBeanTest complexBeanTest, final String name) {
- return new DubboTest(complexBeanTest.getIdLists().toString(), "hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :" + complexBeanTest.getDubboTest().getName() + "-" + name);
- }
-
- private <T> String join(final @NonNull List<T> list, final Function<T, String> mapper) {
- return list.stream()
- .map(mapper)
- .collect(Collectors.joining("-"));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java
deleted file mode 100644
index cb98c9b903..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.annotation.impl;
-
-import com.alibaba.dubbo.config.annotation.Service;
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
-import org.apache.shenyu.examples.common.aop.Log;
-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 java.util.Collections;
-import java.util.Random;
-
-/**
- * The type Dubbo service.
- */
-@Service
-@ApiModule(value = "dubboTestService")
-public class DubboTestServiceImpl implements DubboTestService {
-
- @Override
- @ShenyuDubboClient("/findById")
- @Log
- @ApiDoc(desc = "findById")
- public DubboTest findById(final String id) {
- return new DubboTest(id, "hello world shenyu Alibaba Dubbo, findById");
- }
-
- @Override
- @ShenyuDubboClient("/findAll")
- @ApiDoc(desc = "findAll")
- public DubboTest findAll() {
- return new DubboTest(String.valueOf(new Random().nextInt()), "hello world shenyu Alibaba Dubbo , findAll");
- }
-
- @Override
- @ShenyuDubboClient("/insert")
- @ApiDoc(desc = "insert")
- public DubboTest insert(final DubboTest dubboTest) {
- dubboTest.setName("hello world shenyu Alibaba Dubbo: " + dubboTest.getName());
- return dubboTest;
- }
-
- @Override
- @ShenyuDubboClient("/findList")
- @ApiDoc(desc = "findList")
- public ListResp findList() {
- return new ListResp(1, Collections.singletonList(new DubboTest("1", "test")));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/resources/application.yml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/resources/application.yml
deleted file mode 100644
index ad8d142b1b..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/resources/application.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 8011
- address: 0.0.0.0
- servlet:
- context-path: /
-spring:
- main:
- allow-bean-definition-overriding: true
-
-shenyu:
- register:
- registerType: http
- serverLists: http://localhost:9095
- props:
- username: admin
- password: 123456
- client:
- dubbo:
- props:
- contextPath: /dubbo
- appName: dubbo
-
-dubbo:
- application:
- name: test-dubbo-service
- registry:
- protocol: zookeeper
- address: 127.0.0.1:2181
- protocol:
- name: dubbo
- port: 20888
-
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/Dockerfile b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/Dockerfile
deleted file mode 100644
index f4a2fbd9ee..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/Dockerfile
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre-alpine
-
-ENV APP_NAME shenyu-examples-alibaba-dubbo-service
-ENV LOCAL_PATH /opt/${APP_NAME}
-
-RUN mkdir -p ${LOCAL_PATH}
-
-ADD target/${APP_NAME}.jar ${LOCAL_PATH}
-
-WORKDIR ${LOCAL_PATH}
-EXPOSE 8011
-EXPOSE 20888
-
-CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/ingress.yml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/ingress.yml
deleted file mode 100644
index 349d77f147..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/ingress.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-apiVersion: v1
-kind: Service
-metadata:
- name: dubbo-find-id
- namespace: shenyu-ingress
- annotations:
- kubernetes.io/ingress.class: shenyu
- shenyu.apache.org/plugin-dubbo-enabled: 'true'
- shenyu.apache.org/plugin-dubbo-app-name: dubbo
- shenyu.apache.org/plugin-dubbo-path: /findById
- shenyu.apache.org/plugin-dubbo-rpc-type: dubbo
- shenyu.apache.org/plugin-dubbo-service-name: org.apache.shenyu.examples.dubbo.api.service.DubboTestService
- shenyu.apache.org/plugin-dubbo-method-name: findById
- shenyu.apache.org/plugin-dubbo-params-type: java.lang.String
- shenyu.apache.org/plugin-dubbo-rpc-expand: |
- {"group":"","version":"v0.0.1","loadbalance":"random","retries":2,"timeout":10000,"url":"","sent":false,"cluster":"failover","protocol":"dubbo"}
-spec:
- selector:
- app: shenyu-examples-alibaba-dubbo-service
- ports:
- - port: 8011
-
----
-
-apiVersion: v1
-kind: Service
-metadata:
- name: dubbo-find-all
- namespace: shenyu-ingress
- annotations:
- kubernetes.io/ingress.class: shenyu
- shenyu.apache.org/plugin-dubbo-enabled: 'true'
- shenyu.apache.org/plugin-dubbo-app-name: dubbo
- shenyu.apache.org/plugin-dubbo-path: /findAll
- shenyu.apache.org/plugin-dubbo-rpc-type: dubbo
- shenyu.apache.org/plugin-dubbo-service-name: org.apache.shenyu.examples.dubbo.api.service.DubboTestService
- shenyu.apache.org/plugin-dubbo-method-name: findAll
- shenyu.apache.org/plugin-dubbo-rpc-expand: |
- {"group":"","version":"v0.0.1","loadbalance":"random","retries":2,"timeout":10000,"url":"","sent":false,"cluster":"failover","protocol":"dubbo"}
-spec:
- selector:
- app: shenyu-examples-alibaba-dubbo-service
- ports:
- - port: 8011
-
----
-
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
- namespace: shenyu-ingress
- labels:
- shenyu.apache.org/metadata-labels-1: dubbo-find-id
- shenyu.apache.org/metadata-labels-2: dubbo-find-all
- annotations:
- kubernetes.io/ingress.class: shenyu
- shenyu.apache.org/plugin-dubbo-enabled: 'true'
- shenyu.apache.org/zookeeper-register-address: zookeeper://shenyu-zk:2181
- shenyu.apache.org/upstreams-protocol: dubbo://,dubbo://
- name: demo-ingress
-spec:
- rules:
- - http:
- paths:
- - backend:
- service:
- name: shenyu-examples-alibaba-dubbo-service
- port:
- number: 20888 # please use dubbo protocol port
- path: /**
- pathType: ImplementationSpecific
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-examples-dubbo.yml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-examples-dubbo.yml
deleted file mode 100644
index f67bfcc16d..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-examples-dubbo.yml
+++ /dev/null
@@ -1,80 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: shenyu-examples-dubbo-deployment
- namespace: shenyu-ingress
- labels:
- app: shenyu-examples-dubbo
- all: shenyu-examples-dubbo
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: shenyu-examples-dubbo
- all: shenyu-examples-dubbo
- strategy: {}
- template:
- metadata:
- labels:
- app: shenyu-examples-dubbo
- all: shenyu-examples-dubbo
- spec:
- containers:
- - image: shenyu-examples-alibaba-dubbo-service
- name: shenyu-examples-dubbo
- livenessProbe:
- exec:
- command:
- - wget -q -O - http://localhost:8081/actuator/health | grep UP || exit 1
- initialDelaySeconds: 10
- failureThreshold: 3
- timeoutSeconds: 2
- env:
- - name: shenyu.register.serverLists
- value: http://shenyu-admin:9095
- - name: dubbo.zk
- value: zookeeper://shenyu-zk:2181
- ports:
- - containerPort: 8011
- - containerPort: 20888
- imagePullPolicy: IfNotPresent
- restartPolicy: Always
-status: {}
-
----
-apiVersion: v1
-kind: Service
-metadata:
- name: shenyu-examples-alibaba-dubbo-service
- namespace: shenyu-ingress
- labels:
- app: shenyu-examples-dubbo
- all: shenyu-examples-dubbo
-spec:
- selector:
- app: shenyu-examples-dubbo
- all: shenyu-examples-dubbo
- type: NodePort
- ports:
- - name: "8011"
- port: 8011
- targetPort: 8011
- nodePort: 31190
-status:
- loadBalancer: {}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-zookeeper.yml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-zookeeper.yml
deleted file mode 100644
index 3823508f51..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-zookeeper.yml
+++ /dev/null
@@ -1,87 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Namespace
-metadata:
- name: shenyu-ingress
-
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- namespace: shenyu-ingress
- labels:
- app: shenyu-zk
- all: shenyu-examples-dubbo
- name: shenyu-zk
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: shenyu-zk
- all: shenyu-examples-dubbo
- strategy: {}
- template:
- metadata:
- namespace: shenyu-ingress
- labels:
- app: shenyu-zk
- all: shenyu-examples-dubbo
- spec:
- containers:
- - image: zookeeper:latest
- name: shenyu-zk
- resources: {}
- ports:
- - containerPort: 2181
- name: client
- - containerPort: 2888
- name: server
- - containerPort: 3888
- name: leader-election
- - containerPort: 8080
- name: website
- restartPolicy: Always
-status: {}
-
----
-apiVersion: v1
-kind: Service
-metadata:
- name: shenyu-zk
- namespace: shenyu-ingress
- labels:
- app: shenyu-zk
- all: shenyu-examples-dubbo
-spec:
- type: NodePort
- selector:
- app: shenyu-zk
- all: shenyu-examples-dubbo
- ports:
- - name: "client"
- port: 2181
- targetPort: 2181
- - name: "server"
- port: 2888
- targetPort: 2888
- - name: "election"
- port: 3888
- targetPort: 3888
- - name: "website"
- port: 8080
- targetPort: 8080
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
deleted file mode 100644
index 6e1f5c4ec4..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/pom.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-dubbo</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>shenyu-examples-alibaba-dubbo-service</artifactId>
-
- <properties>
- <curator.version>4.0.1</curator.version>
- <alibaba.dubbo.version>2.6.5</alibaba.dubbo.version>
- <zookeeper.version>3.7.2</zookeeper.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-client-alibaba-dubbo</artifactId>
- <version>${project.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.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-common</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-autoconfigure</artifactId>
- </dependency>
-
- <!-- Dubbo dependency -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.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>
- <finalName>shenyu-examples-alibaba-dubbo-service</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.apache.shenyu.examples.alibaba.dubbo.service.TestAlibabaDubboApplication</mainClass>
- <executable>true</executable>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>example</id>
- <properties>
- <docker.buildArg.APP_NAME>shenyu-examples-alibaba-dubbo-service</docker.buildArg.APP_NAME>
- <docker.image.tag.repo>shenyu-examples-alibaba-dubbo-service</docker.image.tag.repo>
- <docker.image.tag.tagName>latest</docker.image.tag.tagName>
- </properties>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>shenyu-examples-alibaba-dubbo-service</name>
- <build>
- <contextDir>${project.basedir}</contextDir>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-class-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-class-test-api.http
deleted file mode 100644
index 0236a62582..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-class-test-api.http
+++ /dev/null
@@ -1,191 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### shengyu getway proxy orderSave
-POST http://localhost:9195/dubbo/demo/findById
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123"
-}
-
-### shengyu getway proxy findAll
-GET http://localhost:9195/dubbo/demo/findAll
-Accept: application/json
-
-
-### shengyu getway proxy insert
-POST http://localhost:9195/dubbo/demo/insert
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123",
- "name": "test"
-}
-
-### shengyu getway proxy findList
-GET http://localhost:9195/dubbo/demo/findList
-Accept: application/json
-
-### shengyu getway proxy findByIdsAndName
-GET http://localhost:9195/dubbo/demo/findByIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByArrayIdsAndName
-GET http://localhost:9195/dubbo/demo/findByArrayIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByStringArray
-GET http://localhost:9195/dubbo/demo/findByStringArray
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- "123",
- "124",
- "125"
- ]
-}
-
-### shengyu getway proxy findByListId
-GET http://localhost:9195/dubbo/demo/findByListId
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ]
-}
-
-### shengyu getway proxy batchSave
-PUT http://localhost:9195/dubbo/demo/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/dubbo/demo/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/dubbo/demo/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/dubbo/demo/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-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-test-api.http b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-test-api.http
deleted file mode 100644
index afe37b62e6..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/http/apache-dubbo-test-api.http
+++ /dev/null
@@ -1,187 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### shengyu getway proxy orderSave
-POST http://localhost:9195/dubbo/findById
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123"
-}
-
-### shengyu getway proxy findAll
-GET http://localhost:9195/dubbo/findAll
-Accept: application/json
-
-
-### shengyu getway proxy insert
-POST http://localhost:9195/dubbo/insert
-Accept: application/json
-Content-Type: application/json
-
-{
- "id": "123",
- "name": "test"
-}
-
-### shengyu getway proxy findByIdsAndName
-GET http://localhost:9195/dubbo/findByIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByArrayIdsAndName
-GET http://localhost:9195/dubbo/findByArrayIdsAndName
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ],
- "name": "test"
-}
-
-### shengyu getway proxy findByStringArray
-GET http://localhost:9195/dubbo/findByStringArray
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- "123",
- "124",
- "125"
- ]
-}
-
-### shengyu getway proxy findByListId
-GET http://localhost:9195/dubbo/findByListId
-Accept: application/json
-Content-Type: application/json
-
-{
- "ids": [
- 123,
- 124,
- 125
- ]
-}
-
-### shengyu getway proxy batchSave
-PUT http://localhost:9195/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/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/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/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-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/TestAlibabaDubboApplication.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/TestAlibabaDubboApplication.java
deleted file mode 100644
index 611c929671..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/TestAlibabaDubboApplication.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ImportResource;
-
-/**
- * TestDubboApplication.
- */
-@SpringBootApplication
-@ImportResource("classpath:spring-dubbo.xml")
-public class TestAlibabaDubboApplication {
-
- /**
- * Main Entrance.
- *
- * @param args startup arguments
- */
- public static void main(final String[] args) {
- SpringApplication.run(TestAlibabaDubboApplication.class, args);
- }
-
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboClassMultiParamServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboClassMultiParamServiceImpl.java
deleted file mode 100644
index 89635a8cab..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboClassMultiParamServiceImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.impl;
-
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-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.DubboClassMultiParamService;
-import org.springframework.lang.NonNull;
-import org.springframework.stereotype.Service;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * The type Dubbo multi param service.
- */
-@Service("dubboClassMultiParamService")
-@ShenyuDubboClient("/demo")
-@ApiModule(value = "/demo")
-public class DubboClassMultiParamServiceImpl implements DubboClassMultiParamService {
-
- @Override
- @ShenyuDubboClient("/findByIdsAndName")
- @ApiDoc(desc = "findByIdsAndName")
- public DubboTest findByIdsAndName(final List<Integer> ids, final String name) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByArrayIdsAndName")
- @ApiDoc(desc = "findByArrayIdsAndName")
- public DubboTest findByArrayIdsAndName(final Integer[] ids, final String name) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByArrayIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByStringArray")
- @ApiDoc(desc = "findByStringArray")
- public DubboTest findByStringArray(final String[] ids) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByStringArray");
- }
-
- @Override
- @ShenyuDubboClient("/findByListId")
- @ApiDoc(desc = "findByListId")
- public DubboTest findByListId(final List<String> ids) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByListId");
- }
-
- @Override
- @ShenyuDubboClient("/batchSave")
- @ApiDoc(desc = "batchSave")
- public DubboTest batchSave(final List<DubboTest> dubboTestList) {
- return new DubboTest(join(dubboTestList, DubboTest::getId),
- "hello world shenyu alibaba dubbo param batchSave :" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/batchSaveAndNameAndId")
- @ApiDoc(desc = "batchSaveAndNameAndId")
- public DubboTest batchSaveAndNameAndId(final List<DubboTest> dubboTestList, final String id, final String name) {
- return new DubboTest(id, "hello world shenyu alibaba dubbo param batchSaveAndNameAndId :"
- + name + ":" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTest")
- @ApiDoc(desc = "saveComplexBeanTest")
- public DubboTest saveComplexBeanTest(final ComplexBeanTest complexBeanTest) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTest :" + complexBeanTest.getDubboTest().getName());
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTestAndName")
- @ApiDoc(desc = "saveComplexBeanTestAndName")
- public DubboTest saveComplexBeanTestAndName(final ComplexBeanTest complexBeanTest, final String name) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :" + complexBeanTest.getDubboTest().getName() + "-" + name);
- }
-
- @Override
- @ShenyuDubboClient("/bigRequestBody")
- @ApiDoc(desc = "bigRequestBody")
- public DubboTest saveBigRequestBody(final DubboTest dubboTest) {
- return dubboTest;
- }
-
- private <T> String join(final @NonNull List<T> list, final Function<T, String> mapper) {
- return list.stream()
- .map(mapper)
- .collect(Collectors.joining("-"));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboClassTestServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboClassTestServiceImpl.java
deleted file mode 100644
index d7dcaf15e1..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboClassTestServiceImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.impl;
-
-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.DubboClassTestService;
-import org.springframework.stereotype.Service;
-
-import java.util.Collections;
-import java.util.Random;
-
-/**
- * DubboTestServiceImpl.
- */
-@Service("dubboClassTestService")
-@ShenyuDubboClient("/demo/**")
-public class DubboClassTestServiceImpl implements DubboClassTestService {
-
- @Override
- public DubboTest findById(final String id) {
- return new DubboTest(id, "hello world shenyu Alibaba Dubbo, findById");
- }
-
- @Override
- public DubboTest findAll() {
- return new DubboTest(String.valueOf(new Random().nextInt()), "hello world shenyu Alibaba Dubbo , findAll");
- }
-
- @Override
- public DubboTest insert(final DubboTest dubboTest) {
- dubboTest.setName("hello world shenyu Alibaba Dubbo: " + dubboTest.getName());
- return dubboTest;
- }
-
- @Override
- public ListResp findList() {
- return new ListResp(1, Collections.singletonList(new DubboTest("1", "test")));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboMultiParamServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboMultiParamServiceImpl.java
deleted file mode 100644
index 6250b26e9a..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboMultiParamServiceImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.impl;
-
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-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 org.springframework.lang.NonNull;
-import org.springframework.stereotype.Service;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * The type Dubbo multi param service.
- */
-@Service("dubboMultiParamService")
-@ApiModule(value = "dubboMultiParamService")
-public class DubboMultiParamServiceImpl implements DubboMultiParamService {
-
- @Override
- @ShenyuDubboClient("/findByIdsAndName")
- @ApiDoc(desc = "findByIdsAndName")
- public DubboTest findByIdsAndName(final List<Integer> ids, final String name) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByArrayIdsAndName")
- @ApiDoc(desc = "findByArrayIdsAndName")
- public DubboTest findByArrayIdsAndName(final Integer[] ids, final String name) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByArrayIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByStringArray")
- @ApiDoc(desc = "findByStringArray")
- public DubboTest findByStringArray(final String[] ids) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu alibaba dubbo param findByStringArray");
- }
-
- @Override
- @ShenyuDubboClient("/findByListId")
- @ApiDoc(desc = "findByListId")
- public DubboTest findByListId(final List<String> ids) {
- return new DubboTest(ids.toString(), "hello world shenyu alibaba dubbo param findByListId");
- }
-
- @Override
- @ShenyuDubboClient("/batchSave")
- @ApiDoc(desc = "batchSave")
- public DubboTest batchSave(final List<DubboTest> dubboTestList) {
- return new DubboTest(join(dubboTestList, DubboTest::getId),
- "hello world shenyu alibaba dubbo param batchSave :" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/batchSaveAndNameAndId")
- @ApiDoc(desc = "batchSaveAndNameAndId")
- public DubboTest batchSaveAndNameAndId(final List<DubboTest> dubboTestList, final String id, final String name) {
- return new DubboTest(id, "hello world shenyu alibaba dubbo param batchSaveAndNameAndId :"
- + name + ":" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTest")
- @ApiDoc(desc = "saveComplexBeanTest")
- public DubboTest saveComplexBeanTest(final ComplexBeanTest complexBeanTest) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTest :" + complexBeanTest.getDubboTest().getName());
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTestAndName")
- @ApiDoc(desc = "saveComplexBeanTestAndName")
- public DubboTest saveComplexBeanTestAndName(final ComplexBeanTest complexBeanTest, final String name) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :" + complexBeanTest.getDubboTest().getName() + "-" + name);
- }
-
- private <T> String join(final @NonNull List<T> list, final Function<T, String> mapper) {
- return list.stream()
- .map(mapper)
- .collect(Collectors.joining("-"));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboTestServiceImpl.java b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboTestServiceImpl.java
deleted file mode 100644
index 6450ffe8e5..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/impl/DubboTestServiceImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.alibaba.dubbo.service.impl;
-
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
-import org.apache.shenyu.examples.common.aop.Log;
-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.springframework.stereotype.Service;
-
-import java.util.Collections;
-import java.util.Random;
-
-/**
- * DubboTestServiceImpl.
- */
-@Service("dubboTestService")
-@ApiModule(value = "dubboTestService")
-public class DubboTestServiceImpl implements DubboTestService {
-
- @Override
- @ShenyuDubboClient("/findById")
- @Log
- @ApiDoc(desc = "findById")
- public DubboTest findById(final String id) {
- return new DubboTest(id, "hello world shenyu Alibaba Dubbo, findById");
- }
-
- @Override
- @ShenyuDubboClient("/findAll")
- @ApiDoc(desc = "findAll")
- public DubboTest findAll() {
- return new DubboTest(String.valueOf(new Random().nextInt()), "hello world shenyu Alibaba Dubbo , findAll");
- }
-
- @Override
- @ShenyuDubboClient("/insert")
- @ApiDoc(desc = "insert")
- public DubboTest insert(final DubboTest dubboTest) {
- dubboTest.setName("hello world shenyu Alibaba Dubbo: " + dubboTest.getName());
- return dubboTest;
- }
-
- @Override
- @ShenyuDubboClient("/findList")
- @ApiDoc(desc = "findList")
- public ListResp findList() {
- return new ListResp(1, Collections.singletonList(new DubboTest("1", "test")));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/resources/application.yml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/resources/application.yml
deleted file mode 100644
index dddc766c50..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/resources/application.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 8011
- address: 0.0.0.0
- servlet:
- context-path: /
-spring:
- main:
- allow-bean-definition-overriding: true
-dubbo:
- zk: zookeeper://localhost:2181
-
-shenyu:
- register:
- registerType: http
- serverLists: http://localhost:9095
- props:
- username: admin
- password: 123456
- client:
- dubbo:
- props:
- contextPath: /dubbo
- appName: dubbo
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/resources/spring-dubbo.xml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/resources/spring-dubbo.xml
deleted file mode 100644
index b97c6bb8fa..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/src/main/resources/spring-dubbo.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://code.alibabatech.com/schema/dubbo
- https://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <dubbo:application name="test-dubbo-service"/>
-
- <dubbo:registry address="${dubbo.zk}"/>
-
- <dubbo:protocol name="dubbo" port="20888"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboTestService" ref="dubboTestService" version="v0.0.1"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboMultiParamService" ref="dubboMultiParamService" version="v0.0.1"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboClassTestService" ref="dubboClassTestService" version="v0.0.1"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboClassMultiParamService" ref="dubboClassMultiParamService" version="v0.0.1"/>
-</beans>
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/pom.xml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/pom.xml
deleted file mode 100644
index 9dbd88e8e1..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/pom.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>shenyu-examples-dubbo</artifactId>
- <groupId>org.apache.shenyu</groupId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation</artifactId>
-
- <properties>
- <spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>
- <spring-common.version>3.1.2</spring-common.version>
- <spring-cloud-ribbon.version>2.2.10.RELEASE</spring-cloud-ribbon.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>
- <artifactId>shenyu-spring-boot-starter-client-apache-dubbo</artifactId>
- <version>${project.version}</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>${spring-cloud-ribbon.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>spring-cloud-context</artifactId>
- <groupId>org.springframework.cloud</groupId>
- </exclusion>
- </exclusions>
- </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>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-common</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-autoconfigure</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-openfeign</artifactId>
- <version>${spring-common.version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
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
deleted file mode 100644
index 5768fc5e08..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/http/spring-cloud-alibaba-dubbo-test-api.http
+++ /dev/null
@@ -1,187 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-### 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-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/spring/cloud/dubbo/service/annotation/Application.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/Application.java
deleted file mode 100644
index 63bf762816..0000000000
--- 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/Application.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.spring.cloud.dubbo.service.annotation;
-
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-
-/**
- * Application.
- */
-@SpringBootApplication
-@EnableDubbo
-@EnableDiscoveryClient
-public class Application {
-
- /**
- * Main Entrance.
- *
- * @param args startup arguments
- */
- public static void main(final String[] args) {
- SpringApplication.run(Application.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/MultiParamServiceImpl.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/MultiParamServiceImpl.java
deleted file mode 100644
index 0ffa6ae3cd..0000000000
--- 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/MultiParamServiceImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.spring.cloud.dubbo.service.annotation.impl;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.shenyu.client.apidocs.annotations.ApiDoc;
-import org.apache.shenyu.client.apidocs.annotations.ApiModule;
-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 org.springframework.lang.NonNull;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * The type Dubbo multi param service.
- */
-@DubboService
-@ApiModule(value = "dubboMultiParamService")
-public class MultiParamServiceImpl implements DubboMultiParamService {
-
- @Override
- @ShenyuDubboClient("/findByIdsAndName")
- @ApiDoc(desc = "findByIdsAndName")
- public DubboTest findByIdsAndName(final List<Integer> ids, final String name) {
- return new DubboTest(ids.toString(), "hello world shenyu apache dubbo param findByIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByArrayIdsAndName")
- @ApiDoc(desc = "findByArrayIdsAndName")
- public DubboTest findByArrayIdsAndName(final Integer[] ids, final String name) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu apache dubbo param findByArrayIdsAndName :" + name);
- }
-
- @Override
- @ShenyuDubboClient("/findByStringArray")
- @ApiDoc(desc = "findByStringArray")
- public DubboTest findByStringArray(final String[] ids) {
- return new DubboTest(Arrays.toString(ids), "hello world shenyu apache dubbo param findByStringArray");
- }
-
- @Override
- @ShenyuDubboClient("/findByListId")
- @ApiDoc(desc = "findByListId")
- public DubboTest findByListId(final List<String> ids) {
- return new DubboTest(ids.toString(), "hello world shenyu apache dubbo param findByListId");
- }
-
- @Override
- @ShenyuDubboClient("/batchSave")
- @ApiDoc(desc = "batchSave")
- public DubboTest batchSave(final List<DubboTest> dubboTestList) {
- return new DubboTest(join(dubboTestList, DubboTest::getId),
- "hello world shenyu apache dubbo param batchSave :" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/batchSaveAndNameAndId")
- @ApiDoc(desc = "batchSaveAndNameAndId")
- public DubboTest batchSaveAndNameAndId(final List<DubboTest> dubboTestList, final String id, final String name) {
- return new DubboTest(id, "hello world shenyu apache dubbo param batchSaveAndNameAndId :"
- + name + ":" + join(dubboTestList, DubboTest::getName));
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTest")
- @ApiDoc(desc = "saveComplexBeanTest")
- public DubboTest saveComplexBeanTest(final ComplexBeanTest complexBeanTest) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu apache dubbo param saveComplexBeanTest :" + complexBeanTest.getDubboTest().getName());
- }
-
- @Override
- @ShenyuDubboClient("/saveComplexBeanTestAndName")
- @ApiDoc(desc = "saveComplexBeanTestAndName")
- public DubboTest saveComplexBeanTestAndName(final ComplexBeanTest complexBeanTest, final String name) {
- return new DubboTest(complexBeanTest.getIdLists().toString(),
- "hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :" + complexBeanTest.getDubboTest().getName() + "-" + name);
- }
-
- private <T> String join(final @NonNull List<T> list, final Function<T, String> mapper) {
- return list.stream()
- .map(mapper)
- .collect(Collectors.joining("-"));
- }
-}
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/TestServiceImpl.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/TestServiceImpl.java
deleted file mode 100644
index c9c0da46be..0000000000
--- 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/TestServiceImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.spring.cloud.dubbo.service.annotation.impl;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
-import org.apache.shenyu.examples.common.aop.Log;
-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 java.util.Collections;
-import java.util.Random;
-
-/**
- * The type Dubbo service.
- */
-@DubboService
-public class TestServiceImpl implements DubboTestService {
-
- @Override
- @ShenyuDubboClient("/findById")
- @Log
- public DubboTest findById(final String id) {
- return new DubboTest(id, "hello world shenyu Apache, findById");
- }
-
- @Override
- @ShenyuDubboClient("/findAll")
- public DubboTest findAll() {
- return new DubboTest(String.valueOf(new Random().nextInt()), "hello world shenyu Apache, findAll");
- }
-
- @Override
- @ShenyuDubboClient("/insert")
- public DubboTest insert(final DubboTest dubboTest) {
- dubboTest.setName("hello world shenyu Apache Dubbo: " + dubboTest.getName());
- return dubboTest;
- }
-
- @Override
- @ShenyuDubboClient("/findList")
- public ListResp findList() {
- return new ListResp(1, Collections.singletonList(new DubboTest("1", "test")));
- }
-}
diff --git a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/resources/application.yml b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/resources/application.yml
deleted file mode 100644
index 355a5573fa..0000000000
--- a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-spring-cloud-alibaba-dubbo-service-annotation/src/main/resources/application.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 8011
- address: 0.0.0.0
- servlet:
- context-path: /
-spring:
- main:
- allow-bean-definition-overriding: true
- allow-circular-references: true
- application:
- name: test-spring-cloud-alibaba-dubbo-service
-
-shenyu:
- register:
- registerType: http
- serverLists: http://localhost:9095
- props:
- username: admin
- password: 123456
- client:
- dubbo:
- props:
- contextPath: /spring-cloud-alibaba-dubbo
- appName: spring-cloud-alibaba-dubbo
-
-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.spring.cloud.dubbo.service.annotation.impl
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/pom.xml b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/pom.xml
index 09005bba63..d5a87d9008 100644
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/pom.xml
+++ b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/pom.xml
@@ -31,8 +31,6 @@
<modules>
<module>shenyu-examples-sdk-apache-dubbo-consumer</module>
<module>shenyu-examples-sdk-apache-dubbo-provider</module>
- <module>shenyu-examples-sdk-alibaba-dubbo-provider</module>
- <module>shenyu-examples-sdk-alibaba-dubbo-consumer</module>
</modules>
<dependencyManagement>
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/Dockerfile b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/Dockerfile
deleted file mode 100644
index f346f48a15..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre-alpine
-
-ENV APP_NAME shenyu-examples-sdk-alibaba-dubbo-consumer
-ENV LOCAL_PATH /opt/${APP_NAME}
-
-RUN mkdir -p ${LOCAL_PATH}
-
-ADD target/${APP_NAME}.jar ${LOCAL_PATH}
-
-WORKDIR ${LOCAL_PATH}
-EXPOSE 8899
-
-CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/pom.xml b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/pom.xml
deleted file mode 100644
index d2f272efe2..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>shenyu-examples-sdk-dubbo</artifactId>
- <groupId>org.apache.shenyu</groupId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>shenyu-examples-sdk-alibaba-dubbo-consumer</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-sdk-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-dubbo-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-sdk-httpclient</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </dependency>
- <!--spring bootstrap-->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-sdk</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>shenyu-examples-sdk-alibaba-dubbo-consumer</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.ShenyuSdkAlibabaDubboExampleApplication</mainClass>
- <executable>true</executable>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>example</id>
- <properties>
- <docker.buildArg.APP_NAME>shenyu-examples-sdk-alibaba-dubbo-consumer</docker.buildArg.APP_NAME>
- <docker.image.tag.repo>shenyu-examples-sdk-alibaba-dubbo-consumer</docker.image.tag.repo>
- <docker.image.tag.tagName>latest</docker.image.tag.tagName>
- </properties>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>shenyu-examples-sdk-alibaba-dubbo-consumer</name>
- <build>
- <contextDir>${project.basedir}</contextDir>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/http/sdk-alibaba-dubbo-test-api.http b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/http/sdk-alibaba-dubbo-test-api.http
deleted file mode 100644
index 8cdda9e7bc..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/http/sdk-alibaba-dubbo-test-api.http
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-### shengyu alibaba dubbo /sdk/dubbo/findAll
-GET http://localhost:8899/sdk/dubbo/findAll
-Accept: application/json
-Content-Type: application/json
-
-### shengyu alibaba dubbo /sdk/dubbo/findList
-GET http://localhost:8899/sdk/dubbo/findList
-Accept: application/json
-Content-Type: application/json
-
-### shengyu alibaba dubbo /sdk/dubbo/findById
-GET http://localhost:8899/sdk/dubbo/findById?id=1
-Accept: application/json
-Content-Type: application/json
-
-### shengyu alibaba dubbo /sdk/dubbo/findByListId
-POST http://localhost:8899/sdk/dubbo/findByListId
-Accept: application/json
-Content-Type: application/json
-{
- "ids":["1","2"]
-}
-
-### shengyu alibaba dubbo /sdk/dubbo/insert
-POST http://localhost:8899/sdk/dubbo/insert
-Accept: application/json
-Content-Type: application/json
-{
- "id":1L,
- "name":"helloworld"
-}
-
-### shengyu alibaba dubbo /sdk/dubbo/findByIdsAndName
-POST http://localhost:8899/sdk/dubbo/findByIdsAndName
-Accept: application/json
-Content-Type: application/json
-{
- "ids":["1","2"],
- "name":"333"
-}
-
-### shengyu alibaba dubbo /sdk/dubbo/findByArrayIdsAndName
-POST http://localhost:8899/sdk/dubbo/findByArrayIdsAndName
-Accept: application/json
-Content-Type: application/json
-{
- "ids":[1,12],
- "name":"999"
-}
-
-### shengyu alibaba dubbo /sdk/dubbo/saveComplexBeanTest
-POST http://localhost:8899/sdk/dubbo/saveComplexBeanTest
-Accept: application/json
-Content-Type: application/json
-{
- "dubboTest":{
- "id": "123",
- "name": "test1"
- },
- "idLists": [
- "1",
- "2"
- ],
- "idMaps": {
- }
-}
-
-### shengyu alibaba dubbo /sdk/dubbo/batchSave
-POST http://localhost:8899/sdk/dubbo/batchSave
-Accept: application/json
-Content-Type: application/json
-{
- "dubboTestList": [
- {
- "name": "22222",
- "id": "122"
- }
- ]
-}
-
-### shengyu alibaba dubbo /sdk/dubbo/batchSaveAndNameAndId
-POST http://localhost:8899/sdk/dubbo/batchSaveAndNameAndId
-Accept: application/json
-Content-Type: application/json
-{
- "dubboTestList": [
- {
- "name": "22222",
- "id": "122"
- }
- ],
- "id":"123344",
- "name":"testete"
-}
-
-
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/ShenyuSdkAlibabaDubboExampleApplication.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/ShenyuSdkAlibabaDubboExampleApplication.java
deleted file mode 100644
index 8572644d06..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/ShenyuSdkAlibabaDubboExampleApplication.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer;
-
-import org.apache.shenyu.sdk.spring.EnableShenyuClients;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * ShenyuSdkAlibabaDubboExampleApplication.
- */
-@SpringBootApplication
-@EnableShenyuClients(basePackages = "org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.api")
-public class ShenyuSdkAlibabaDubboExampleApplication {
-
- /**
- * main.
- *
- * @param args args
- */
- public static void main(final String[] args) {
- SpringApplication.run(ShenyuSdkAlibabaDubboExampleApplication.class, args);
- }
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/api/ShenyuAlibabaDubboClientApi.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/api/ShenyuAlibabaDubboClientApi.java
deleted file mode 100644
index cd0a27ac12..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/api/ShenyuAlibabaDubboClientApi.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.api;
-
-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.entity.ListResp;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto.DubboRequestBody;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto.DubboTestSaveRequest;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.impl.ShenyuAlibabaDubboClientApiFallBack;
-import org.apache.shenyu.sdk.spring.ShenyuClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-
-/**
- * ShenyuApacheDubboClientApi.
- */
-@ShenyuClient(value = "shenyu-gateway", fallback = ShenyuAlibabaDubboClientApiFallBack.class)
-public interface ShenyuAlibabaDubboClientApi {
-
- /**
- * findAll.
- * test Get.
- *
- * @return SdkTestDto
- */
- @GetMapping("/dubbo/findAll")
- DubboTest findAll();
-
- /**
- * findList.
- *
- * @return ListResp
- */
- @GetMapping("/dubbo/findList")
- ListResp findList();
-
- /**
- * findById.
- *
- * @param id id
- * @return DubboTest
- */
- @GetMapping("/dubbo/findById")
- DubboTest findById(@RequestParam("id") String id);
-
- /**
- * insert.
- *
- * @param dubboTest dubboTest
- * @return DubboTest
- */
- @PostMapping("/dubbo/insert")
- DubboTest insert(@RequestBody DubboTest dubboTest);
-
- /**
- * findByListId.
- *
- * @param ids ids
- * @return DubboTest
- */
- @PostMapping("/dubbo/findByListId")
- DubboTest findByListId(@RequestBody List<String> ids);
-
- /**
- * findByIdsAndName.
- *
- * @param dubboRequestBody dubboRequestBody
- * @return DubboTest
- */
- @PostMapping("/dubbo/demo/findByIdsAndName")
- DubboTest findByIdsAndName(@RequestBody DubboRequestBody dubboRequestBody);
-
- /**
- * findByArrayIdsAndName.
- *
- * @param dubboRequestBody dubboRequestBody
- * @return DubboTest
- */
- @PostMapping("/dubbo/demo/findByIdsAndName")
- DubboTest findByArrayIdsAndName(@RequestBody DubboRequestBody dubboRequestBody);
-
- /**
- * saveComplexBeanTest.
- *
- * @param complexBeanTest complexBeanTest
- * @return DubboTest
- */
- @PostMapping("/dubbo/saveComplexBeanTest")
- DubboTest saveComplexBeanTest(@RequestBody ComplexBeanTest complexBeanTest);
-
- /**
- * batchSave.
- *
- * @param dubboTestSaveRequest dubboTestSaveRequest
- * @return DubboTest
- */
- @PostMapping("/dubbo/batchSave")
- DubboTest batchSave(@RequestBody DubboTestSaveRequest dubboTestSaveRequest);
-
- /**
- * batchSaveAndNameAndId.
- *
- * @param dubboTestSaveRequest dubboTestSaveRequest
- * @return DubboTest
- */
- @PostMapping("/dubbo/batchSaveAndNameAndId")
- DubboTest batchSaveAndNameAndId(@RequestBody DubboTestSaveRequest dubboTestSaveRequest);
-
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/controller/ShenyuAlibabaDubboSdkExampleController.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/controller/ShenyuAlibabaDubboSdkExampleController.java
deleted file mode 100644
index 81feb6da07..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/controller/ShenyuAlibabaDubboSdkExampleController.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.controller;
-
-import java.util.List;
-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.entity.ListResp;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.api.ShenyuAlibabaDubboClientApi;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto.DubboRequestBody;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto.DubboTestSaveRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * ShenyuHttpSdkExampleController.
- * invoke shenyuSdkAPi
- */
-@RestController
-public class ShenyuAlibabaDubboSdkExampleController {
-
- @Autowired
- private ShenyuAlibabaDubboClientApi shenyuApacheDubboClientApi;
-
- /**
- * findAll.
- * @return SdkTestDto
- */
- @GetMapping("/sdk/dubbo/findAll")
- public DubboTest findAll() {
- return shenyuApacheDubboClientApi.findAll();
- }
-
- /**
- * findList.
- * @return ListResp
- */
- @GetMapping("/sdk/dubbo/findList")
- public ListResp findList() {
- return shenyuApacheDubboClientApi.findList();
- }
-
- /**
- * findById.
- * @param id id
- * @return DubboTest
- */
- @GetMapping("/sdk/dubbo/findById")
- public DubboTest findById(final @RequestParam("id") String id) {
- return shenyuApacheDubboClientApi.findById(id);
- }
-
- /**
- * findByListId.
- * @param ids ids
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/findByListId")
- public DubboTest findByListId(final @RequestBody List<String> ids) {
- return shenyuApacheDubboClientApi.findByListId(ids);
- }
-
- /**
- * insert.
- * @param dubboTest dubboTest
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/insert")
- public DubboTest insert(final @RequestBody DubboTest dubboTest) {
- return shenyuApacheDubboClientApi.insert(dubboTest);
- }
-
- /**
- * findByIdsAndName.
- * @param dubboRequestBody dubboRequestBody
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/demo/findByIdsAndName")
- public DubboTest findByIdsAndName(final @RequestBody DubboRequestBody dubboRequestBody) {
- return shenyuApacheDubboClientApi.findByIdsAndName(dubboRequestBody);
- }
-
- /**
- * findByArrayIdsAndName.
- * @param dubboRequestBody dubboRequestBody
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/findByArrayIdsAndName")
- public DubboTest findByArrayIdsAndName(final @RequestBody DubboRequestBody dubboRequestBody) {
- return shenyuApacheDubboClientApi.findByArrayIdsAndName(dubboRequestBody);
- }
-
- /**
- * saveComplexBeanTest.
- * @param complexBeanTest complexBeanTest
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/saveComplexBeanTest")
- public DubboTest saveComplexBeanTest(final @RequestBody ComplexBeanTest complexBeanTest) {
- return shenyuApacheDubboClientApi.saveComplexBeanTest(complexBeanTest);
- }
-
- /**
- * batchSave.
- * @param dubboTestSaveRequest dubboTestSaveRequest
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/batchSave")
- public DubboTest batchSave(final @RequestBody DubboTestSaveRequest dubboTestSaveRequest) {
- return shenyuApacheDubboClientApi.batchSave(dubboTestSaveRequest);
- }
-
- /**
- * batchSaveAndNameAndId.
- * @param dubboTestSaveRequest dubboTestSaveRequest
- * @return DubboTest
- */
- @PostMapping("/sdk/dubbo/batchSaveAndNameAndId")
- public DubboTest batchSaveAndNameAndId(final @RequestBody DubboTestSaveRequest dubboTestSaveRequest) {
- return shenyuApacheDubboClientApi.batchSaveAndNameAndId(dubboTestSaveRequest);
- }
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/dto/DubboRequestBody.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/dto/DubboRequestBody.java
deleted file mode 100644
index b09ec13ef2..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/dto/DubboRequestBody.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto;
-
-import java.util.List;
-
-/**
- * DubboRequestBody.
- * @param <T> type
- */
-public class DubboRequestBody<T> {
-
- /**
- * ids.
- */
-
- private List<T> ids;
- /**
- * name.
- */
-
- private String name;
-
- /**
- * getIds.
- * @return list
- */
- public List<T> getIds() {
- return ids;
- }
-
- /**
- * setIds.
- * @param ids ids
- */
- public void setIds(final List<T> ids) {
- this.ids = ids;
- }
-
- /**
- * getName.
- * @return name
- */
- public String getName() {
- return name;
- }
-
- /**
- * setName.
- * @param name name
- */
- public void setName(final String name) {
- this.name = name;
- }
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/dto/DubboTestSaveRequest.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/dto/DubboTestSaveRequest.java
deleted file mode 100644
index 42bd6ec4cd..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/dto/DubboTestSaveRequest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto;
-
-import java.util.List;
-import org.apache.shenyu.examples.dubbo.api.entity.DubboTest;
-
-/**
- * DubboTestSaveRequest.
- */
-public class DubboTestSaveRequest {
-
- /**
- * dubboTestList.
- */
- private List<DubboTest> dubboTestList;
-
- /**
- * id.
- */
- private String id;
-
- /**
- * name.
- */
- private String name;
-
- /**
- * getId.
- * @return id
- */
- public String getId() {
- return id;
- }
-
- /**
- * setId.
- * @param id id
- */
- public void setId(final String id) {
- this.id = id;
- }
-
- /**
- * getName.
- * @return name
- */
- public String getName() {
- return name;
- }
-
- /**
- * setName.
- * @param name name
- */
- public void setName(final String name) {
- this.name = name;
- }
-
- /**
- * getDubboTestList.
- * @return list
- */
- public List<DubboTest> getDubboTestList() {
- return dubboTestList;
- }
-
- /**
- * setDubboTestList.
- * @param dubboTestList dubboTestList
- */
- public void setDubboTestList(final List<DubboTest> dubboTestList) {
- this.dubboTestList = dubboTestList;
- }
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/impl/ShenyuAlibabaDubboClientApiFallBack.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/impl/ShenyuAlibabaDubboClientApiFallBack.java
deleted file mode 100644
index ff7452bd3b..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/java/org/apache/shenyu/examples/sdk/alibaba/dubbo/consumer/impl/ShenyuAlibabaDubboClientApiFallBack.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.impl;
-
-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.entity.ListResp;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.api.ShenyuAlibabaDubboClientApi;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto.DubboRequestBody;
-import org.apache.shenyu.examples.sdk.alibaba.dubbo.consumer.dto.DubboTestSaveRequest;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Component
-public class ShenyuAlibabaDubboClientApiFallBack implements ShenyuAlibabaDubboClientApi {
-
- @Override
- public DubboTest findAll() {
-
- DubboTest dubboTest = new DubboTest();
- dubboTest.setId("a");
- dubboTest.setName("fallback");
- return dubboTest;
- }
-
- @Override
- public ListResp findList() {
- return null;
- }
-
- @Override
- public DubboTest findById(final String id) {
- return null;
- }
-
- @Override
- public DubboTest insert(final DubboTest dubboTest) {
- return null;
- }
-
- @Override
- public DubboTest findByListId(final List<String> ids) {
- return null;
- }
-
- @Override
- public DubboTest findByIdsAndName(final DubboRequestBody dubboRequestBody) {
- return null;
- }
-
- @Override
- public DubboTest findByArrayIdsAndName(final DubboRequestBody dubboRequestBody) {
- return null;
- }
-
- @Override
- public DubboTest saveComplexBeanTest(final ComplexBeanTest complexBeanTest) {
- return null;
- }
-
- @Override
- public DubboTest batchSave(final DubboTestSaveRequest dubboTestSaveRequest) {
- return null;
- }
-
- @Override
- public DubboTest batchSaveAndNameAndId(final DubboTestSaveRequest dubboTestSaveRequest) {
- return null;
- }
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/resources/application.yml b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/resources/application.yml
deleted file mode 100644
index 5bf348aa9f..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-consumer/src/main/resources/application.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-server:
- port: 8899
- address: 0.0.0.0
- tomcat:
- max-http-form-post-size: 100MB
-
-shenyu:
- register:
- registerType: http
- serverLists: http://localhost:9095
- props:
- username: admin
- password: 123456
- client:
- dubbo:
- props:
- contextPath: /http
- appName: http
-
- sdk:
- enabled: true
- register-type: zookeeper #local #etcd #nacos #consul
- server-lists: localhost:2181 #http://localhost:9095 #http://localhost:2379 #localhost:8848
-
-spring:
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
-management:
- endpoint:
- health:
- enabled: true
-
-logging:
- level:
- root: info
- org.springframework.boot: info
- org.apache.ibatis: info
- org.apache.shenyu.test.bonuspoint: info
- org.apache.shenyu.test.lottery: debug
- org.apache.shenyu.test: debug
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/Dockerfile b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/Dockerfile
deleted file mode 100644
index 05737e3d93..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/Dockerfile
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre-alpine
-
-ENV APP_NAME shenyu-examples-sdk-alibaba-dubbo-provider
-ENV LOCAL_PATH /opt/${APP_NAME}
-
-RUN mkdir -p ${LOCAL_PATH}
-
-ADD target/${APP_NAME}.jar ${LOCAL_PATH}
-
-WORKDIR ${LOCAL_PATH}
-EXPOSE 8011
-EXPOSE 20888
-
-CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/pom.xml b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/pom.xml
deleted file mode 100644
index 668ebad407..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/pom.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-sdk-dubbo</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-examples-sdk-alibaba-dubbo-provider</artifactId>
-
- <properties>
- <curator.version>5.2.1</curator.version>
- <nacos-client.version>2.0.4</nacos-client.version>
- <alibaba.dubbo.version>2.6.5</alibaba.dubbo.version>
- <zookeeper.version>3.7.2</zookeeper.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-client-alibaba-dubbo</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-common</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-examples-alibaba-dubbo-service</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>shenyu-examples-sdk-alibaba-dubbo-provider</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.apache.shenyu.examples.sdk.alibaba.provider.ShenyuSdkAlibabaDubboProviderApplication</mainClass>
- <executable>true</executable>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>example</id>
- <properties>
- <docker.buildArg.APP_NAME>shenyu-examples-sdk-alibaba-dubbo-provider</docker.buildArg.APP_NAME>
- <docker.image.tag.repo>shenyu-examples-sdk-alibaba-dubbo-provider</docker.image.tag.repo>
- <docker.image.tag.tagName>latest</docker.image.tag.tagName>
- </properties>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>shenyu-examples-sdk-alibaba-dubbo-provider</name>
- <build>
- <contextDir>${project.basedir}</contextDir>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/http/sdk-alibaba-dubbo-test-api.http b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/http/sdk-alibaba-dubbo-test-api.http
deleted file mode 100644
index a513a01285..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/http/sdk-alibaba-dubbo-test-api.http
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-### shengyu alibaba dubbo /sdk/dubbo/findAll
-GET http://localhost:8899/sdk/dubbo/findAll
-Accept: application/json
-Content-Type: application/json
-
-
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/java/org/apache/shenyu/examples/sdk/alibaba/provider/ShenyuSdkAlibabaDubboProviderApplication.java b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/java/org/apache/shenyu/examples/sdk/alibaba/provider/ShenyuSdkAlibabaDubboProviderApplication.java
deleted file mode 100644
index cffec5c3fc..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/java/org/apache/shenyu/examples/sdk/alibaba/provider/ShenyuSdkAlibabaDubboProviderApplication.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.examples.sdk.alibaba.provider;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.ImportResource;
-
-/**
- * ShenyuAlibabaDubboProviderApplication.
- */
-@SpringBootApplication
-@ImportResource("classpath:spring-dubbo.xml")
-@ComponentScan(basePackages = "org.apache.shenyu.examples.alibaba.dubbo.service.impl")
-public class ShenyuSdkAlibabaDubboProviderApplication {
-
- /**
- * main.
- *
- * @param args args
- */
- public static void main(final String[] args) {
- SpringApplication.run(ShenyuSdkAlibabaDubboProviderApplication.class, args);
- }
-}
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/resources/application.yml b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/resources/application.yml
deleted file mode 100644
index dddc766c50..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/resources/application.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 8011
- address: 0.0.0.0
- servlet:
- context-path: /
-spring:
- main:
- allow-bean-definition-overriding: true
-dubbo:
- zk: zookeeper://localhost:2181
-
-shenyu:
- register:
- registerType: http
- serverLists: http://localhost:9095
- props:
- username: admin
- password: 123456
- client:
- dubbo:
- props:
- contextPath: /dubbo
- appName: dubbo
diff --git a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/resources/spring-dubbo.xml b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/resources/spring-dubbo.xml
deleted file mode 100644
index 426684189d..0000000000
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-alibaba-dubbo-provider/src/main/resources/spring-dubbo.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://code.alibabatech.com/schema/dubbo
- https://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <dubbo:application name="test-dubbo-service"/>
-
- <dubbo:registry address="${dubbo.zk}"/>
-
- <dubbo:protocol name="dubbo" port="20888"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboTestService" ref="dubboTestService"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboMultiParamService" ref="dubboMultiParamService"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboClassTestService" ref="dubboClassTestService"/>
-
- <dubbo:service timeout="10000" interface="org.apache.shenyu.examples.dubbo.api.service.DubboClassMultiParamService" ref="dubboClassMultiParamService"/>
-</beans>
diff --git a/shenyu-integrated-test/pom.xml b/shenyu-integrated-test/pom.xml
index 01e568e13c..b0b40d2560 100644
--- a/shenyu-integrated-test/pom.xml
+++ b/shenyu-integrated-test/pom.xml
@@ -33,7 +33,6 @@
<module>shenyu-integrated-test-https</module>
<module>shenyu-integrated-test-spring-cloud</module>
<module>shenyu-integrated-test-common</module>
- <module>shenyu-integrated-test-alibaba-dubbo</module>
<module>shenyu-integrated-test-apache-dubbo</module>
<module>shenyu-integrated-test-grpc</module>
<module>shenyu-integrated-test-motan</module>
@@ -42,13 +41,11 @@
<module>shenyu-integrated-test-rewrite</module>
<module>shenyu-integrated-test-combination</module>
<module>shenyu-integrated-test-sdk-apache-dubbo</module>
- <module>shenyu-integrated-test-sdk-alibaba-dubbo</module>
<module>shenyu-integrated-test-sdk-http</module>
<module>shenyu-integrated-test-upload-plugin</module>
<module>shenyu-integrated-test-k8s-ingress-http</module>
<module>shenyu-integrated-test-k8s-ingress-spring-cloud</module>
<module>shenyu-integrated-test-k8s-ingress-motan</module>
- <module>shenyu-integrated-test-k8s-ingress-alibaba-dubbo</module>
<module>shenyu-integrated-test-k8s-ingress-apache-dubbo</module>
<module>shenyu-integrated-test-k8s-ingress-websocket</module>
<module>shenyu-integrated-test-k8s-ingress-grpc</module>
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/Dockerfile b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/Dockerfile
deleted file mode 100644
index 922170ac0d..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre-alpine
-
-ENV APP_NAME shenyu-integrated-test-alibaba-dubbo
-ENV LOCAL_PATH /opt/${APP_NAME}
-
-RUN mkdir -p ${LOCAL_PATH}
-
-ADD target/${APP_NAME}.jar ${LOCAL_PATH}
-
-WORKDIR ${LOCAL_PATH}
-EXPOSE 9195
-
-CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/docker-compose.yml b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/docker-compose.yml
deleted file mode 100644
index 0f57932ee2..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/docker-compose.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: "3.9"
-services:
- shenyu-zk:
- container_name: shenyu-zk
- image: zookeeper:3.5
- restart: always
- networks:
- - shenyu
-
- shenyu-admin:
- image: apache/shenyu-admin:latest
- container_name: shenyu-admin
- restart: always
- networks:
- - shenyu
- ports:
- - "9095:9095"
- environment:
- - SPRING_PROFILES_ACTIVE=h2
- - shenyu.database.init_script=sql-script/h2/schema.sql
- healthcheck:
- test: ["CMD-SHELL", "wget -q -O - http://shenyu-admin:9095/actuator/health | grep UP || exit 1"]
- timeout: 2s
- retries: 3
- start_period: 5s
-
- shenyu-examples-alibaba-dubbo-service:
- deploy:
- resources:
- limits:
- memory: 2048M
- container_name: shenyu-examples-alibaba-dubbo-service
- image: shenyu-examples-alibaba-dubbo-service:latest
- restart: always
- healthcheck:
- test: ["CMD-SHELL", "wget -q -O - http://localhost:8011/actuator/health | grep UP || exit 1"]
- timeout: 2s
- retries: 3
- start_period: 5s
- ports:
- - "8011:8011"
- - "20888:20888"
- networks:
- - shenyu
- depends_on:
- shenyu-integrated-test-alibaba-dubbo:
- condition: service_healthy
- environment:
- - dubbo.zk=zookeeper://shenyu-zk:2181
- - shenyu.register.serverLists=http://shenyu-admin:9095
-
- shenyu-integrated-test-alibaba-dubbo:
- container_name: shenyu-integrated-test-alibaba-dubbo
- image: apache/shenyu-integrated-test-alibaba-dubbo:latest
- restart: always
- deploy:
- resources:
- limits:
- memory: 2048M
- environment:
- - shenyu.sync.websocket.urls=ws://shenyu-admin:9095/websocket
- depends_on:
- shenyu-admin:
- condition: service_healthy
- ports:
- - "9195:9195"
- healthcheck:
- test: [ "CMD", "wget", "-q", "-O", "-", "http://shenyu-integrated-test-alibaba-dubbo:9195/actuator/health" ]
- timeout: 2s
- retries: 3
- start_period: 5s
- networks:
- - shenyu
-
-networks:
- shenyu:
- name: shenyu
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/pom.xml b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/pom.xml
deleted file mode 100644
index 7fc4641701..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/pom.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?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">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-integrated-test</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>shenyu-integrated-test-alibaba-dubbo</artifactId>
- <name>shenyu-integrated-test-alibaba-dubbo</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-integrated-test-common</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!--shenyu alibaba dubbo plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-alibaba-dubbo</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- </exclusions>
- </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>
- <!--shenyu alibaba dubbo plugin end-->
- </dependencies>
-
- <profiles>
- <profile>
- <id>it</id>
- <properties>
- <docker.buildArg.APP_NAME>shenyu-integrated-test-alibaba-dubbo</docker.buildArg.APP_NAME>
- <docker.image.tag.repo>apache/shenyu-integrated-test-alibaba-dubbo</docker.image.tag.repo>
- <docker.image.tag.tagName>latest</docker.image.tag.tagName>
- </properties>
- <build>
- <finalName>shenyu-integrated-test-alibaba-dubbo</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <mainClass>org.apache.shenyu.integrated.test.alibaba.dubbo.AlibabaDubboIntegrationBootstrap
- </mainClass>
- <executable>true</executable>
- </configuration>
- </plugin>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>apache/shenyu-integrated-test-alibaba-dubbo</name>
- <build>
- <contextDir>${project.basedir}</contextDir>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>false</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/script/healthcheck.sh b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/script/healthcheck.sh
deleted file mode 100644
index 22a76034ab..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/script/healthcheck.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PRGDIR=`dirname "$0"`
-for service in `grep -v -E "^$|^#" ${PRGDIR}/services.list`
-do
- for loop in `seq 1 30`
- do
- status=`curl -o /dev/null -s -w %{http_code} $service`
- echo -e "curl $service response $status"
-
- if [ $status -eq 200 ]; then
- break
- fi
-
- sleep 2
- done
-done
-
-sleep 3
-echo -e "\n-------------------"
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/script/services.list b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/script/services.list
deleted file mode 100644
index c65735d7ce..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/script/services.list
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-http://localhost:9095/actuator/health
-http://localhost:9195/actuator/health
-http://localhost:8011/actuator/health
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboIntegrationBootstrap.java b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboIntegrationBootstrap.java
deleted file mode 100644
index 23fc48542b..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboIntegrationBootstrap.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * The type Alibaba dubbo integration bootstrap.
- */
-@SpringBootApplication
-public class AlibabaDubboIntegrationBootstrap {
-
- /**
- * The entry point of application.
- *
- * @param args the input arguments
- */
- public static void main(final String[] args) {
- SpringApplication.run(AlibabaDubboIntegrationBootstrap.class);
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/resources/application-local.yml b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/resources/application-local.yml
deleted file mode 100644
index 62566a9c65..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/resources/application-local.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 9195
- address: 0.0.0.0
-
-spring:
- main:
- allow-bean-definition-overriding: true
- application:
- name: shenyu-bootstrap
-# cloud:
-# nacos:
-# discovery:
-# server-addr: 127.0.0.1:8848
-
-management:
- health:
- defaults:
- enabled: false
-
-shenyu:
- switchConfig:
- local: true
- cross:
- enabled: true
- sync:
- websocket:
- urls: ws://localhost:9095/websocket
- allowOrigin: ws://localhost:9195
- exclude:
- enabled: true
- paths:
- - /favicon.ico
- - /actuator/health
- local:
- enabled: true
- sha512Key: "BA3253876AED6BC22D4A6FF53D8406C6AD864195ED144AB5C87621B6C233B548BAEAE6956DF346EC8C17F5EA10F35EE3CBC514797ED7DDD3145464E2A0BAB413"
- sharedPool:
- enable: true
-logging:
- level:
- root: info
- org.springframework.boot: info
- org.apache.ibatis: info
- org.apache.shenyu.bonuspoint: info
- org.apache.shenyu.lottery: info
- org.apache.shenyu: info
-
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/resources/application.yml b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/resources/application.yml
deleted file mode 100644
index 393ad24df1..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/main/resources/application.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-spring:
- profiles:
- active: local
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamSplicingClassTest.java b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamSplicingClassTest.java
deleted file mode 100644
index 3dca57e313..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamSplicingClassTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import com.google.common.collect.Lists;
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.ComplexBeanTest;
-import org.apache.shenyu.integratedtest.common.dto.ComplexBeanTestWithNameRequest;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.dto.DubboTestListRequest;
-import org.apache.shenyu.integratedtest.common.dto.DubboTestListWithIdAndNameRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdArrayAndNameRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdStringArrayRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdStringListRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdsAndNameRequest;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.IntStream;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class AlibabaDubboPluginMultiParamSplicingClassTest extends AbstractPluginDataInit {
-
- @BeforeAll
- public static void setup() throws IOException {
- String pluginResult = initPlugin(PluginEnum.DUBBO.getName(), "{\"register\":\"zookeeper://shenyu-zk:2181\"}");
- assertThat(pluginResult, is("success"));
- }
-
- @Test
- public void testFindByIdsAndName() throws IOException {
- final IdsAndNameRequest idsAndNameRequest = new IdsAndNameRequest();
- idsAndNameRequest.setName("name");
- idsAndNameRequest.setIds(Lists.newArrayList(123, 124, 125));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/findByIdsAndName", idsAndNameRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByIdsAndName :name", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testFindByArrayIdsAndName() throws IOException {
- final IdArrayAndNameRequest idArrayAndNameRequest = new IdArrayAndNameRequest();
- idArrayAndNameRequest.setName("name");
- idArrayAndNameRequest.setIds(IntStream.of(123, 124, 125).boxed().toArray(Integer[]::new));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/findByArrayIdsAndName", idArrayAndNameRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByArrayIdsAndName :name", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testFindByStringArray() throws IOException {
- final IdStringArrayRequest idStringArrayRequest = new IdStringArrayRequest();
- idStringArrayRequest.setIds(IntStream.of(123, 124, 125).mapToObj(String::valueOf).toArray(String[]::new));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/findByStringArray", idStringArrayRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByStringArray", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testFindByListId() throws IOException {
- final IdStringListRequest idStringListRequest = new IdStringListRequest();
- idStringListRequest.setIds(Lists.newArrayList("123", "124", "125"));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/findByListId", idStringListRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByListId", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testBatchSave() throws IOException {
- final DubboTestListRequest dubboTestListRequest = new DubboTestListRequest();
- List<DubboTest> dubboTestList = new ArrayList<>();
- dubboTestList.add(new DubboTest("123", "name123"));
- dubboTestList.add(new DubboTest("124", "name124"));
- dubboTestList.add(new DubboTest("125", "name125"));
- dubboTestListRequest.setDubboTestList(dubboTestList);
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/batchSave", dubboTestListRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param batchSave :name123-name124-name125", dubboTest.getName());
- assertEquals("123-124-125", dubboTest.getId());
- }
-
- @Test
- public void testBatchSaveAndNameAndId() throws IOException {
- final DubboTestListWithIdAndNameRequest request = new DubboTestListWithIdAndNameRequest();
- request.setId("122");
- request.setName("name122");
- List<DubboTest> dubboTestList = new ArrayList<>();
- dubboTestList.add(new DubboTest("123", "name123"));
- dubboTestList.add(new DubboTest("124", "name124"));
- dubboTestList.add(new DubboTest("125", "name125"));
- request.setDubboTestList(dubboTestList);
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/batchSaveAndNameAndId", request, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param batchSaveAndNameAndId :name122:name123-name124-name125", dubboTest.getName());
- assertEquals("122", dubboTest.getId());
- }
-
- @Test
- public void testSaveComplexBeanTest() throws IOException {
- final ComplexBeanTest complexBeanTest = new ComplexBeanTest();
- complexBeanTest.setDubboTest(new DubboTest("122", "name"));
- complexBeanTest.setIdLists(Lists.newArrayList("123", "124"));
- Map<String, String> idMaps = new HashMap<>();
- idMaps.put("key_abc", "value_abc");
- idMaps.put("key_cbd", "value_cbd");
- complexBeanTest.setIdMaps(idMaps);
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/saveComplexBeanTest", complexBeanTest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param saveComplexBeanTest :name", dubboTest.getName());
- assertEquals("[123, 124]", dubboTest.getId());
- }
-
- @Test
- public void testSaveComplexBeanTestAndName() throws IOException {
- final ComplexBeanTestWithNameRequest request = new ComplexBeanTestWithNameRequest();
- ComplexBeanTest complexBeanTest = new ComplexBeanTest();
- complexBeanTest.setDubboTest(new DubboTest("122", "name122"));
- complexBeanTest.setIdLists(Lists.newArrayList("123", "124"));
- Map<String, String> idMaps = new HashMap<>();
- idMaps.put("key_abc", "value_abc");
- idMaps.put("key_cbd", "value_cbd");
- complexBeanTest.setIdMaps(idMaps);
- request.setComplexBeanTest(complexBeanTest);
- request.setName("name");
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/saveComplexBeanTestAndName", request, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :name122-name", dubboTest.getName());
- assertEquals("[123, 124]", dubboTest.getId());
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java
deleted file mode 100644
index 9689fab559..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.IntStream;
-
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.ComplexBeanTest;
-import org.apache.shenyu.integratedtest.common.dto.ComplexBeanTestWithNameRequest;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.dto.DubboTestListRequest;
-import org.apache.shenyu.integratedtest.common.dto.DubboTestListWithIdAndNameRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdArrayAndNameRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdStringArrayRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdStringListRequest;
-import org.apache.shenyu.integratedtest.common.dto.IdsAndNameRequest;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import com.google.common.collect.Lists;
-
-public class AlibabaDubboPluginMultiParamTest extends AbstractPluginDataInit {
-
- @BeforeAll
- public static void setup() throws IOException {
- String pluginResult = initPlugin(PluginEnum.DUBBO.getName(), "{\"register\":\"zookeeper://shenyu-zk:2181\"}");
- assertThat(pluginResult, is("success"));
- }
-
- @Test
- public void testFindByIdsAndName() throws IOException {
- final IdsAndNameRequest idsAndNameRequest = new IdsAndNameRequest();
- idsAndNameRequest.setName("name");
- idsAndNameRequest.setIds(Lists.newArrayList(123, 124, 125));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/findByIdsAndName", idsAndNameRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByIdsAndName :name", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testFindByArrayIdsAndName() throws IOException {
- final IdArrayAndNameRequest idArrayAndNameRequest = new IdArrayAndNameRequest();
- idArrayAndNameRequest.setName("name");
- idArrayAndNameRequest.setIds(IntStream.of(123, 124, 125).boxed().toArray(Integer[]::new));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/findByArrayIdsAndName", idArrayAndNameRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByArrayIdsAndName :name", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testFindByStringArray() throws IOException {
- final IdStringArrayRequest idStringArrayRequest = new IdStringArrayRequest();
- idStringArrayRequest.setIds(IntStream.of(123, 124, 125).mapToObj(String::valueOf).toArray(String[]::new));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/findByStringArray", idStringArrayRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByStringArray", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testFindByListId() throws IOException {
- final IdStringListRequest idStringListRequest = new IdStringListRequest();
- idStringListRequest.setIds(Lists.newArrayList("123", "124", "125"));
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/findByListId", idStringListRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param findByListId", dubboTest.getName());
- assertEquals("[123, 124, 125]", dubboTest.getId());
- }
-
- @Test
- public void testBatchSave() throws IOException {
- final DubboTestListRequest dubboTestListRequest = new DubboTestListRequest();
- List<DubboTest> dubboTestList = new ArrayList<>();
- dubboTestList.add(new DubboTest("123", "name123"));
- dubboTestList.add(new DubboTest("124", "name124"));
- dubboTestList.add(new DubboTest("125", "name125"));
- dubboTestListRequest.setDubboTestList(dubboTestList);
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/batchSave", dubboTestListRequest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param batchSave :name123-name124-name125", dubboTest.getName());
- assertEquals("123-124-125", dubboTest.getId());
- }
-
- @Test
- public void testBatchSaveAndNameAndId() throws IOException {
- final DubboTestListWithIdAndNameRequest request = new DubboTestListWithIdAndNameRequest();
- request.setId("122");
- request.setName("name122");
- List<DubboTest> dubboTestList = new ArrayList<>();
- dubboTestList.add(new DubboTest("123", "name123"));
- dubboTestList.add(new DubboTest("124", "name124"));
- dubboTestList.add(new DubboTest("125", "name125"));
- request.setDubboTestList(dubboTestList);
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/batchSaveAndNameAndId", request, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param batchSaveAndNameAndId :name122:name123-name124-name125", dubboTest.getName());
- assertEquals("122", dubboTest.getId());
- }
-
- @Test
- public void testSaveComplexBeanTest() throws IOException {
- final ComplexBeanTest complexBeanTest = new ComplexBeanTest();
- complexBeanTest.setDubboTest(new DubboTest("122", "name"));
- complexBeanTest.setIdLists(Lists.newArrayList("123", "124"));
- Map<String, String> idMaps = new HashMap<>();
- idMaps.put("key_abc", "value_abc");
- idMaps.put("key_cbd", "value_cbd");
- complexBeanTest.setIdMaps(idMaps);
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/saveComplexBeanTest", complexBeanTest, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param saveComplexBeanTest :name", dubboTest.getName());
- assertEquals("[123, 124]", dubboTest.getId());
- }
-
- @Test
- public void testSaveComplexBeanTestAndName() throws IOException {
- final ComplexBeanTestWithNameRequest request = new ComplexBeanTestWithNameRequest();
- ComplexBeanTest complexBeanTest = new ComplexBeanTest();
- complexBeanTest.setDubboTest(new DubboTest("122", "name122"));
- complexBeanTest.setIdLists(Lists.newArrayList("123", "124"));
- Map<String, String> idMaps = new HashMap<>();
- idMaps.put("key_abc", "value_abc");
- idMaps.put("key_cbd", "value_cbd");
- complexBeanTest.setIdMaps(idMaps);
- request.setComplexBeanTest(complexBeanTest);
- request.setName("name");
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/saveComplexBeanTestAndName", request, DubboTest.class);
- assertEquals("hello world shenyu alibaba dubbo param saveComplexBeanTestAndName :name122-name", dubboTest.getName());
- assertEquals("[123, 124]", dubboTest.getId());
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginSharedThreadPoolTest.java b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginSharedThreadPoolTest.java
deleted file mode 100644
index 1d9027862d..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginSharedThreadPoolTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import com.google.gson.reflect.TypeToken;
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.dto.ListResp;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class AlibabaDubboPluginSharedThreadPoolTest extends AbstractPluginDataInit {
-
- @BeforeAll
- public static void setup() throws IOException {
- String pluginResult = initPlugin(PluginEnum.DUBBO.getName(), "{\"register\":\"zookeeper://shenyu-zk:2181\",\"threadpool\": \"shared\"}");
- assertThat(pluginResult, is("success"));
- }
-
- @Test
- public void testFindById() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/dubbo/findById?id=1", new TypeToken<DubboTest>() {
- }.getType());
- assertEquals("hello world shenyu Alibaba Dubbo, findById", dubboTest.getName());
- }
-
- @Test
- public void testFindAll() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/dubbo/findAll", DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo , findAll", dubboTest.getName());
- }
-
- @Test
- public void testInsert() throws IOException {
- DubboTest req = new DubboTest("1", "insertName");
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/insert", req, DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo: insertName", dubboTest.getName());
- assertEquals("1", dubboTest.getId());
- }
-
- @Test
- public void testFindList() throws IOException {
- ListResp listResp = HttpHelper.INSTANCE.getFromGateway("/dubbo/findList", ListResp.class);
- List<DubboTest> users = listResp.getUsers();
- assertEquals(listResp.getTotal().intValue(), users.size());
- assertEquals("test", users.get(0).getName());
- assertEquals("1", users.get(0).getId());
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginSplicingClassTest.java b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginSplicingClassTest.java
deleted file mode 100644
index 8fcfc42dfc..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginSplicingClassTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import com.google.gson.reflect.TypeToken;
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.dto.ListResp;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class AlibabaDubboPluginSplicingClassTest extends AbstractPluginDataInit {
-
- @BeforeAll
- public static void setup() throws IOException {
- String pluginResult = initPlugin(PluginEnum.DUBBO.getName(), "{\"register\":\"zookeeper://shenyu-zk:2181\"}");
- assertThat(pluginResult, is("success"));
- }
-
- @Test
- public void testFindById() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/dubbo/demo/findById?id=1", new TypeToken<DubboTest>() {
- }.getType());
- assertEquals("hello world shenyu Alibaba Dubbo, findById", dubboTest.getName());
- }
-
- @Test
- public void testFindAll() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/dubbo/demo/findAll", DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo , findAll", dubboTest.getName());
- }
-
- @Test
- public void testInsert() throws IOException {
- DubboTest req = new DubboTest("1", "insertName");
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/demo/insert", req, DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo: insertName", dubboTest.getName());
- assertEquals("1", dubboTest.getId());
- }
-
- @Test
- public void testFindList() throws IOException {
- ListResp listResp = HttpHelper.INSTANCE.getFromGateway("/dubbo/demo/findList", ListResp.class);
- List<DubboTest> users = listResp.getUsers();
- assertEquals(listResp.getTotal().intValue(), users.size());
- assertEquals("test", users.get(0).getName());
- assertEquals("1", users.get(0).getId());
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java
deleted file mode 100644
index 311d348f3c..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.dto.ListResp;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import com.google.gson.reflect.TypeToken;
-
-public class AlibabaDubboPluginTest extends AbstractPluginDataInit {
-
- @BeforeAll
- public static void setup() throws IOException {
- String pluginResult = initPlugin(PluginEnum.DUBBO.getName(), "{\"register\":\"zookeeper://shenyu-zk:2181\"}");
- assertThat(pluginResult, is("success"));
- }
-
- @Test
- public void testFindById() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/dubbo/findById?id=1", new TypeToken<DubboTest>() {
- }.getType());
- assertEquals("hello world shenyu Alibaba Dubbo, findById", dubboTest.getName());
- }
-
- @Test
- public void testFindAll() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/dubbo/findAll", DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo , findAll", dubboTest.getName());
- }
-
- @Test
- public void testInsert() throws IOException {
- DubboTest req = new DubboTest("1", "insertName");
- DubboTest dubboTest = HttpHelper.INSTANCE.postGateway("/dubbo/insert", req, DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo: insertName", dubboTest.getName());
- assertEquals("1", dubboTest.getId());
- }
-
- @Test
- public void testFindList() throws IOException {
- ListResp listResp = HttpHelper.INSTANCE.getFromGateway("/dubbo/findList", ListResp.class);
- List<DubboTest> users = listResp.getUsers();
- assertEquals(listResp.getTotal().intValue(), users.size());
- assertEquals("test", users.get(0).getName());
- assertEquals("1", users.get(0).getId());
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginMultiParamTest.java
similarity index 99%
rename from shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java
rename to shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginMultiParamTest.java
index 50c2ee135a..505cf1c691 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java
+++ b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginMultiParamTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
+package org.apache.shenyu.integrated.test.apache.dubbo;
import com.google.common.collect.Lists;
import java.io.IOException;
diff --git a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginSharedThreadPoolTest.java b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginSharedThreadPoolTest.java
similarity index 98%
rename from shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginSharedThreadPoolTest.java
rename to shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginSharedThreadPoolTest.java
index 5c5feb096c..aa4f69e7b5 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginSharedThreadPoolTest.java
+++ b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginSharedThreadPoolTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
+package org.apache.shenyu.integrated.test.apache.dubbo;
import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
diff --git a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginTest.java
similarity index 98%
rename from shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
rename to shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginTest.java
index 7d8f203764..3562f3b512 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
+++ b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/apache/dubbo/ApacheDubboPluginTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
+package org.apache.shenyu.integrated.test.apache.dubbo;
import java.io.IOException;
import java.util.List;
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/Dockerfile b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/Dockerfile
deleted file mode 100644
index c3ba58d8c8..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre-alpine
-
-ENV APP_NAME shenyu-integrated-test-k8s-ingress-alibaba-dubbo
-ENV LOCAL_PATH /opt/${APP_NAME}
-
-RUN mkdir -p ${LOCAL_PATH}
-
-ADD target/${APP_NAME}.jar ${LOCAL_PATH}
-
-WORKDIR ${LOCAL_PATH}
-EXPOSE 9195
-
-CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/deploy-shenyu.yaml b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/deploy-shenyu.yaml
deleted file mode 100644
index 4fa40fdaea..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/deploy-shenyu.yaml
+++ /dev/null
@@ -1,103 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-automountServiceAccountToken: true
-kind: ServiceAccount
-metadata:
- name: shenyu-ingress-controller
- namespace: shenyu-ingress
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: shenyu-ingress-controller
- namespace: shenyu-ingress
- labels:
- app: shenyu-ingress-controller
- all: shenyu-ingress-controller
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: shenyu-ingress-controller
- template:
- metadata:
- labels:
- app: shenyu-ingress-controller
- spec:
- containers:
- - name: shenyu-ingress-controller
- image: apache/shenyu-integrated-test-k8s-ingress-alibaba-dubbo:latest
- ports:
- - containerPort: 9195
- imagePullPolicy: IfNotPresent
- serviceAccountName: shenyu-ingress-controller
----
-apiVersion: v1
-kind: Service
-metadata:
- name: shenyu-ingress-controller
- namespace: shenyu-ingress
-spec:
- selector:
- app: shenyu-ingress-controller
- type: NodePort
- ports:
- - port: 9195
- targetPort: 9195
- nodePort: 30095
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
- name: shenyu-ingress-controller
- namespace: shenyu-ingress
-rules:
-- apiGroups:
- - ""
- resources:
- - namespaces
- - services
- - endpoints
- - secrets
- - pods
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - networking.k8s.io
- resources:
- - ingresses
- verbs:
- - get
- - list
- - watch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
- name: shenyu-ingress-controller
- namespace: shenyu-ingress
-roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: shenyu-ingress-controller
-subjects:
-- kind: ServiceAccount
- name: shenyu-ingress-controller
- namespace: shenyu-ingress
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/kind-config.yaml b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/kind-config.yaml
deleted file mode 100644
index 18b7da990e..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/kind-config.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-nodes:
- - role: control-plane
- kubeadmConfigPatches:
- - |
- kind: InitConfiguration
- nodeRegistration:
- kubeletExtraArgs:
- node-labels: "ingress-ready=true"
- extraPortMappings:
- - containerPort: 80
- hostPort: 80
- protocol: TCP
- - containerPort: 443
- hostPort: 443
- protocol: TCP
- - containerPort: 30095
- hostPort: 30095
- protocol: TCP
\ No newline at end of file
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/pom.xml b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/pom.xml
deleted file mode 100644
index beefb06ba3..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/pom.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-<?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">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-integrated-test</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>shenyu-integrated-test-k8s-ingress-alibaba-dubbo</artifactId>
- <name>shenyu-integrated-test-k8s-ingress-alibaba-dubbo</name>
-
- <dependencies>
- <!--shenyu alibaba dubbo plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-alibaba-dubbo</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${alibaba.dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- </exclusions>
- </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>
- <!--shenyu alibaba dubbo plugin end-->
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-integrated-test-common</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-httpclient</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-global</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-uri</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-general-context</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!-- shenyu kubernetes controller begin -->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-k8s</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- shenyu kubernetes controller end -->
- </dependencies>
-
- <profiles>
- <profile>
- <id>it</id>
- <properties>
- <docker.buildArg.APP_NAME>shenyu-integrated-test-k8s-ingress-alibaba-dubbo</docker.buildArg.APP_NAME>
- <docker.image.tag.repo>apache/shenyu-integrated-test-k8s-ingress-alibaba-dubbo</docker.image.tag.repo>
- <docker.image.tag.tagName>latest</docker.image.tag.tagName>
- </properties>
- <build>
- <finalName>shenyu-integrated-test-k8s-ingress-alibaba-dubbo</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <mainClass>org.apache.shenyu.integrated.test.k8s.ingress.alibaba.dubbo.AlibabaDubboIngressControllerIntegratedBootstrap
- </mainClass>
- <executable>true</executable>
- </configuration>
- </plugin>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>apache/shenyu-integrated-test-k8s-ingress-alibaba-dubbo</name>
- <build>
- <contextDir>${project.basedir}</contextDir>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>false</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/build_k8s_cluster.sh b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/build_k8s_cluster.sh
deleted file mode 100644
index 98d0c3c191..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/build_k8s_cluster.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-kind load docker-image "shenyu-examples-alibaba-dubbo-service:latest"
-kind load docker-image "apache/shenyu-integrated-test-k8s-ingress-alibaba-dubbo:latest"
-kubectl apply -f ./shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-zookeeper.yml
-kubectl wait --for=condition=Ready pod -l app=shenyu-zk -n shenyu-ingress
-kubectl apply -f ./shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/shenyu-examples-dubbo.yml
-kubectl apply -f ./shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/deploy/deploy-shenyu.yaml
-kubectl apply -f ./shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service/k8s/ingress.yml
-
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/healthcheck.sh b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/healthcheck.sh
deleted file mode 100644
index 22a76034ab..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/healthcheck.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PRGDIR=`dirname "$0"`
-for service in `grep -v -E "^$|^#" ${PRGDIR}/services.list`
-do
- for loop in `seq 1 30`
- do
- status=`curl -o /dev/null -s -w %{http_code} $service`
- echo -e "curl $service response $status"
-
- if [ $status -eq 200 ]; then
- break
- fi
-
- sleep 2
- done
-done
-
-sleep 3
-echo -e "\n-------------------"
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/services.list b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/services.list
deleted file mode 100644
index a162741c47..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/script/services.list
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-http://localhost:30095/actuator/health
-http://localhost:31190/actuator/health
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/k8s/ingress/alibaba/dubbo/AlibabaDubboIngressControllerIntegratedBootstrap.java b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/k8s/ingress/alibaba/dubbo/AlibabaDubboIngressControllerIntegratedBootstrap.java
deleted file mode 100644
index e7b6bd22ac..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/k8s/ingress/alibaba/dubbo/AlibabaDubboIngressControllerIntegratedBootstrap.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.k8s.ingress.alibaba.dubbo;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * The type Alibaba dubbo integration bootstrap.
- */
-@SpringBootApplication
-public class AlibabaDubboIngressControllerIntegratedBootstrap {
-
- /**
- * The entry point of application.
- *
- * @param args the input arguments
- */
- public static void main(final String[] args) {
- SpringApplication.run(AlibabaDubboIngressControllerIntegratedBootstrap.class);
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/main/resources/application.yml b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/main/resources/application.yml
deleted file mode 100644
index 854a16e169..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/main/resources/application.yml
+++ /dev/null
@@ -1,329 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 9195
- address: 0.0.0.0
-
-spring:
- main:
- allow-bean-definition-overriding: true
- application:
- name: shenyu-bootstrap
- codec:
- max-in-memory-size: 2MB
- cloud:
- discovery:
- enabled: false
- nacos:
- discovery:
- server-addr: 127.0.0.1:8848 # Spring Cloud Alibaba Dubbo use this.
- enabled: false
- namespace: ShenyuRegisterCenter
-
-# if you want use ribbon please config every server.
-#springCloud-test:
-# ribbon:
-# NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
-
-eureka:
- client:
- enabled: false
- serviceUrl:
- defaultZone: http://localhost:8761/eureka/
- instance:
- prefer-ip-address: true
-
-# security:
-# oauth2:
-# client:
-# registration:
-# <your client-registration-id>:
-# client-id: <your client-id>
-# client-secret: <your client-secret>
-# provider:
-# <your client-registration-id>:
-# authorization-uri: <your authorization-uri>
-# token-uri: <your access-token-uri>
-# user-info-uri: <your user-info-uri>
-# jwk-set-uri: <your jwk-set-uri>
-
-management:
- health:
- redis:
- enabled: false
- elasticsearch:
- enabled: false
- endpoint:
- health:
- enabled: true
- show-details: always
- endpoints:
- web:
- exposure:
- include: "*" # or health,info
-
-
-shenyu:
- selectorMatchCache:
- ## selector L1 cache
- cache:
- enabled: false
- initialCapacity: 10000 # initial capacity in cache
- maximumSize: 10000 # max size in cache
- ## selector L2 cache, use trie as L2 cache
- trie:
- enabled: false
- cacheSize: 128 # the number of plug-ins
- matchMode: antPathMatch
- ruleMatchCache:
- ## rule L1 cache
- cache:
- enabled: true
- initialCapacity: 10000 # initial capacity in cache
- maximumSize: 65536 # max size in cache
- ## rule L2 cache, use trie as L2 cache
- trie:
- enabled: false
- cacheSize: 1024 # the number of selectors
- matchMode: antPathMatch
- netty:
- http:
- # set to false, user can custom the netty tcp server config.
- webServerFactoryEnabled: true
- selectCount: 1
- workerCount: 8
- accessLog: false
- serverSocketChannel:
- soRcvBuf: 87380
- soBackLog: 128
- soReuseAddr: false
- connectTimeoutMillis: 10000
- writeBufferHighWaterMark: 65536
- writeBufferLowWaterMark: 32768
- writeSpinCount: 16
- autoRead: false
- allocType: "pooled"
- messageSizeEstimator: 8
- singleEventExecutorPerGroup: true
- socketChannel:
- soKeepAlive: false
- soReuseAddr: false
- soLinger: -1
- tcpNoDelay: true
- soRcvBuf: 87380
- soSndBuf: 16384
- ipTos: 0
- allowHalfClosure: false
- connectTimeoutMillis: 10000
- writeBufferHighWaterMark: 65536
- writeBufferLowWaterMark: 32768
- writeSpinCount: 16
- autoRead: false
- allocType: "pooled"
- messageSizeEstimator: 8
- singleEventExecutorPerGroup: true
- sni:
- enabled: false
- mod: k8s #manul
- defaultK8sSecretNamespace: shenyu-ingress
- defaultK8sSecretName: default-cert
-# mod: manual
-# certificates:
-# - domain: 'localhost'
-# keyCertChainFile: '/Users/zhukunshuai/Desktop/cert/example.com+1.pem'
-# keyFile: '/Users/zhukunshuai/Desktop/cert/example.com+1-key.pem'
-# - domain: 'example.com'
-# keyCertChainFile: '/Users/zhukunshuai/Desktop/cert/example.com+1.pem'
-# keyFile: '/Users/zhukunshuai/Desktop/cert/example.com+1-key.pem'
- httpclient:
- strategy: netty
-# connectTimeout: 45000
-# responseTimeout: 3000
-# readerIdleTime: 3000
-# writerIdleTime: 3000
-# allIdleTime: 3000
-# readTimeout: 3000
-# writeTimeout: 3000
-# wiretap: false
-# keepAlive: false
-# maxInMemorySize: 1 #1mb
-# pool:
-# type: ELASTIC
-# name: proxy
-# maxConnections: 16
-# acquireTimeout: 45000
-# maxIdleTime: 3000
-# proxy:
-# host:
-# port:
-# username:
-# password:
-# nonProxyHostsPattern:
-# ssl:
-# useInsecureTrustManager: true
-# keyStoreType: PKCS12
-# keyStorePath: classpath:keystore.p12
-# keyStorePassword: 123456
-# keyStoreProvider:
-# keyPassword: 123456
-# trustedX509Certificates:
-# handshakeTimeout:
-# closeNotifyFlushTimeout:
-# closeNotifyReadTimeout:
-# defaultConfigurationType:
-# threadPool:
-# prefix: shenyu
-# selectCount: 1
-# workerCount: 8
-# daemon: true
- register:
- enabled: false
- registerType: zookeeper #etcd #consul
- serverLists: localhost:2181 #http://localhost:2379 #localhost:8848
- props:
- cross:
- enabled: true
- allowedHeaders:
- allowedMethods: "*"
- allowedAnyOrigin: true # the same of Access-Control-Allow-Origin: "*"
-# allowedOrigin:
- # format : schema://prefix spacer domain
- # Access-Control-Allow-Origin: "http://a.apache.org,http://b.apache.org"
-# spacer: "."
-# domain: apache.org
-# prefixes:
-# - a # a.apache.org
-# - b # b.apache.org
-# origins:
-# - c.apache.org
-# - d.apache.org
-# - http://e.apache.org
-# originRegex: ^http(|s)://(.*\.|)abc.com$
- allowedExpose: ""
- maxAge: "18000"
- allowCredentials: true
-
- switchConfig:
- local: true
- collapseSlashes: false
- file:
- enabled: true
- maxSize : 10
-# sync:
-# websocket:
-# urls: ws://localhost:9095/websocket
-# allowOrigin: ws://localhost:9195
-# apollo:
-# appId: shenyu
-# meta: http://localhost:8080
-# env: dev
-# clusterName: test
-# namespace: application
-# zookeeper:
-# url: localhost:2181
-# sessionTimeout: 5000
-# connectionTimeout: 2000
-# http:
-# url: http://localhost:9095
-# username:
-# password:
-# nacos:
-# url: localhost:8848
-# namespace: 1c10d748-af86-43b9-8265-75f487d20c6c
-# username:
-# password:
-# acm:
-# enabled: false
-# endpoint: acm.aliyun.com
-# namespace:
-# accessKey:
-# secretKey:
-# etcd:
-# url: http://localhost:2379
-# consul:
-# url: http://localhost:8500
-# waitTime: 1000
-# watchDelay: 1000
- exclude:
- enabled: false
- paths:
- - /favicon.ico
- fallback:
- enabled: false
- paths:
- - /fallback/hystrix
- - /fallback/resilience4j
- - /fallback/sentinel
- health:
- enabled: true
- paths:
- - /actuator
- - /health_check
- extPlugin:
- path:
- enabled: true
- threads: 1
- scheduleTime: 300
- scheduleDelay: 30
- scheduler:
- enabled: false
- type: fixed
- threads: 16
- upstreamCheck:
- enabled: false
- poolSize: 10
- timeout: 3000
- healthyThreshold: 1
- unhealthyThreshold: 1
- interval: 5000
- printEnabled: true
- printInterval: 60000
- springCloudCache:
- enabled: false
- ribbon:
- serverListRefreshInterval: 10000
- metrics:
- enabled: false
- name : prometheus
- host: 127.0.0.1
- port: 8090
- jmxConfig:
- props:
- jvm_enabled: true
-# plugins:
-# rate-limiter.enabled: false
- local:
- enabled: false
- sha512Key: "BA3253876AED6BC22D4A6FF53D8406C6AD864195ED144AB5C87621B6C233B548BAEAE6956DF346EC8C17F5EA10F35EE3CBC514797ED7DDD3145464E2A0BAB413"
-# sharedPool:
-# enable: true
-# prefix: "shenyu-shared"
-# corePoolSize: 200
-# maximumPoolSize: 2000
-# keepAliveTime: 60000
-# # 1GB
-# maxWorkQueueMemory: 1073741824
-# # 256MB
-# maxFreeMemory: 268435456
-
-logging:
- level:
- root: info
- org.springframework.boot: info
- org.apache.ibatis: info
- org.apache.shenyu.bonuspoint: info
- org.apache.shenyu.lottery: info
- org.apache.shenyu: info
diff --git a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/k8s/ingress/alibaba/dubbo/AlibabaDubboPluginTest.java b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/k8s/ingress/alibaba/dubbo/AlibabaDubboPluginTest.java
deleted file mode 100644
index a5178d043c..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/k8s/ingress/alibaba/dubbo/AlibabaDubboPluginTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.k8s.ingress.alibaba.dubbo;
-
-import com.google.gson.reflect.TypeToken;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class AlibabaDubboPluginTest extends AbstractPluginDataInit {
-
- private static final HttpHelper HTTP_HELPER = HttpHelper.INSTANCE;
-
- @BeforeAll
- public static void setup() {
- HTTP_HELPER.setGatewayEndpoint("http://localhost:30095");
- }
-
- @Test
- public void testFindById() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/findById?id=1", new TypeToken<DubboTest>() {
- }.getType());
- assertEquals("hello world shenyu Alibaba Dubbo, findById", dubboTest.getName());
- }
-
- @Test
- public void testFindAll() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getFromGateway("/findAll", DubboTest.class);
- assertEquals("hello world shenyu Alibaba Dubbo , findAll", dubboTest.getName());
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/Dockerfile b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/Dockerfile
deleted file mode 100644
index 6c66232cfd..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre-alpine
-
-ENV APP_NAME shenyu-integrated-test-sdk-alibaba-dubbo
-ENV LOCAL_PATH /opt/${APP_NAME}
-
-RUN mkdir -p ${LOCAL_PATH}
-
-ADD target/${APP_NAME}.jar ${LOCAL_PATH}
-
-WORKDIR ${LOCAL_PATH}
-EXPOSE 9195
-
-CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/docker-compose.yml b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/docker-compose.yml
deleted file mode 100644
index c9d43db4ac..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/docker-compose.yml
+++ /dev/null
@@ -1,111 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: "3.9"
-services:
- shenyu-zk:
- container_name: shenyu-zk
- image: zookeeper:latest
- restart: always
- networks:
- - shenyu
- ports:
- - "2181:2181"
-
- shenyu-admin:
- image: apache/shenyu-admin:latest
- container_name: shenyu-admin
- restart: always
- networks:
- - shenyu
- ports:
- - "9095:9095"
- environment:
- - SPRING_PROFILES_ACTIVE=h2
- - shenyu.database.init_script=sql-script/h2/schema.sql
- healthcheck:
- test: ["CMD-SHELL", "wget -q -O - http://shenyu-admin:9095/actuator/health | grep UP || exit 1"]
- timeout: 2s
- retries: 3
- start_period: 5s
- shenyu-examples-sdk-alibaba-dubbo-provider:
- deploy:
- resources:
- limits:
- memory: 2048M
- container_name: shenyu-examples-sdk-alibaba-dubbo-provider
- image: shenyu-examples-sdk-alibaba-dubbo-provider:latest
- restart: always
- healthcheck:
- test: ["CMD-SHELL", "wget -q -O - http://localhost:8011/actuator/health | grep UP || exit 1"]
- timeout: 2s
- retries: 3
- start_period: 5s
- ports:
- - "8011:8011"
- - "20888:20888"
- networks:
- - shenyu
- environment:
- - dubbo.registry.address=zookeeper://shenyu-zk:2181
- - shenyu.register.serverLists=http://shenyu-admin:9095
-
- shenyu-examples-sdk-alibaba-dubbo-consumer:
- deploy:
- resources:
- limits:
- memory: 2048M
- container_name: shenyu-examples-sdk-alibaba-dubbo-consumer
- image: shenyu-examples-sdk-alibaba-dubbo-consumer:latest
- restart: always
- healthcheck:
- test: ["CMD-SHELL", "wget -q -O - http://localhost:8899/actuator/health | grep UP || exit 1"]
- timeout: 2s
- retries: 3
- start_period: 5s
- ports:
- - "8899:8899"
- networks:
- - shenyu
- environment:
- - shenyu.register.serverLists=http://shenyu-admin:9095
-
- shenyu-integrated-test-sdk-alibaba-dubbo:
- container_name: shenyu-integrated-test-sdk-alibaba-dubbo
- image: apache/shenyu-integrated-test-sdk-alibaba-dubbo:latest
- restart: always
- deploy:
- resources:
- limits:
- memory: 2048M
- environment:
- - dubbo.registry.address=zookeeper://shenyu-zk:2181
- - shenyu.sync.websocket.urls=ws://shenyu-admin:9095/websocket
- depends_on:
- shenyu-admin:
- condition: service_healthy
- ports:
- - "9195:9195"
- healthcheck:
- test: [ "CMD", "wget", "-q", "-O", "-", "http://shenyu-integrated-test-sdk-alibaba-dubbo:9195/actuator/health" ]
- timeout: 2s
- retries: 3
- start_period: 5s
- networks:
- - shenyu
-
-networks:
- shenyu:
- name: shenyu
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/pom.xml b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/pom.xml
deleted file mode 100644
index 0f31eef37a..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/pom.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?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">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-integrated-test</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>shenyu-integrated-test-sdk-alibaba-dubbo</artifactId>
- <name>shenyu-integrated-test-sdk-alibaba-dubbo</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-integrated-test-common</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-registry</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-gateway</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-apache-dubbo</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>3.1.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-x-discovery</artifactId>
- <version>5.1.0</version>
- </dependency>
- <!-- Dubbo zookeeper registry dependency start -->
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>4.0.1</version>
- <exclusions>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>4.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-recipes</artifactId>
- <version>4.0.1</version>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>it</id>
- <properties>
- <docker.buildArg.APP_NAME>shenyu-integrated-test-sdk-alibaba-dubbo</docker.buildArg.APP_NAME>
- <docker.image.tag.repo>apache/shenyu-integrated-test-sdk-alibaba-dubbo</docker.image.tag.repo>
- <docker.image.tag.tagName>latest</docker.image.tag.tagName>
- </properties>
- <build>
- <finalName>shenyu-integrated-test-sdk-alibaba-dubbo</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <mainClass>org.apache.shenyu.integrated.test.alibaba.dubbo.SdkAlibabaDubboIntegratedBootstrap
- </mainClass>
- <executable>true</executable>
- </configuration>
- </plugin>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>apache/shenyu-integrated-test-sdk-alibaba-dubbo</name>
- <build>
- <contextDir>${project.basedir}</contextDir>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/script/healthcheck.sh b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/script/healthcheck.sh
deleted file mode 100644
index 22a76034ab..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/script/healthcheck.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PRGDIR=`dirname "$0"`
-for service in `grep -v -E "^$|^#" ${PRGDIR}/services.list`
-do
- for loop in `seq 1 30`
- do
- status=`curl -o /dev/null -s -w %{http_code} $service`
- echo -e "curl $service response $status"
-
- if [ $status -eq 200 ]; then
- break
- fi
-
- sleep 2
- done
-done
-
-sleep 3
-echo -e "\n-------------------"
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/script/services.list b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/script/services.list
deleted file mode 100644
index 19a97d90ca..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/script/services.list
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-http://localhost:9095/actuator/health
-http://localhost:8011/actuator/health
-http://localhost:9195/actuator/health
-http://localhost:8899/actuator/health
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/alibaba/dubbo/SdkAlibabaDubboIntegratedBootstrap.java b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/alibaba/dubbo/SdkAlibabaDubboIntegratedBootstrap.java
deleted file mode 100644
index 1ca6aea676..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/main/java/org/apache/shenyu/integrated/test/alibaba/dubbo/SdkAlibabaDubboIntegratedBootstrap.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * The type sdk Alibaba dubbo integrated bootstrap.
- */
-@SpringBootApplication
-public class SdkAlibabaDubboIntegratedBootstrap {
-
- /**
- * The entry point of application.
- *
- * @param args the input arguments
- */
- public static void main(final String[] args) {
- SpringApplication.run(SdkAlibabaDubboIntegratedBootstrap.class);
- }
-}
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/main/resources/application.yml b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/main/resources/application.yml
deleted file mode 100644
index ea8e73bba6..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/main/resources/application.yml
+++ /dev/null
@@ -1,152 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- port: 9195
- address: 0.0.0.0
-
-spring:
- main:
- allow-bean-definition-overriding: true
- application:
- name: shenyu-bootstrap
-
-management:
- health:
- defaults:
- enabled: false
-
-shenyu:
- matchCache:
- selectorEnabled: false
- ruleEnabled: true
- maxSelectorFreeMemory: 256 # 256MB
- maxRuleFreeMemory: 256 # 256MB
- netty:
- http:
- # set to false, user can custom the netty tcp server config.
- webServerFactoryEnabled: true
- selectCount: 1
- workerCount: 4
- accessLog: false
- serverSocketChannel:
- soRcvBuf: 87380
- soBackLog: 128
- soReuseAddr: false
- connectTimeoutMillis: 10000
- writeBufferHighWaterMark: 65536
- writeBufferLowWaterMark: 32768
- writeSpinCount: 16
- autoRead: false
- allocType: "pooled"
- messageSizeEstimator: 8
- singleEventExecutorPerGroup: true
- socketChannel:
- soKeepAlive: false
- soReuseAddr: false
- soLinger: -1
- tcpNoDelay: true
- soRcvBuf: 87380
- soSndBuf: 16384
- ipTos: 0
- allowHalfClosure: false
- connectTimeoutMillis: 10000
- writeBufferHighWaterMark: 65536
- writeBufferLowWaterMark: 32768
- writeSpinCount: 16
- autoRead: false
- allocType: "pooled"
- messageSizeEstimator: 8
- singleEventExecutorPerGroup: true
- register:
- enabled: true
- registerType: zookeeper #etcd #consul
- serverLists: localhost:2181 #http://localhost:2379 #localhost:8848
- props:
- cross:
- enabled: true
- allowedHeaders:
- allowedMethods: "*"
- allowedAnyOrigin: true # the same of Access-Control-Allow-Origin: "*"
- allowedExpose: ""
- maxAge: "18000"
- allowCredentials: true
-
- switchConfig:
- local: true
- file:
- enabled: true
- maxSize : 10
- sync:
- websocket:
- urls: ws://localhost:9095/websocket
- allowOrigin: ws://localhost:9195
- exclude:
- enabled: true
- paths:
- - /favicon.ico
- - /actuator/health
- fallback:
- enabled: false
- paths:
- - /fallback/hystrix
- - /fallback/resilience4j
- health:
- enabled: false
- paths:
- - /actuator/health
- - /health_check
- extPlugin:
- path:
- enabled: true
- threads: 1
- scheduleTime: 300
- scheduleDelay: 30
- scheduler:
- enabled: false
- type: fixed
- threads: 16
- upstreamCheck:
- enabled: false
- timeout: 3000
- healthyThreshold: 1
- unhealthyThreshold: 1
- interval: 5000
- printEnabled: true
- printInterval: 60000
- ribbon:
- serverListRefreshInterval: 10000
- metrics:
- enabled: false
- name : prometheus
- host: 127.0.0.1
- port: 8090
- jmxConfig:
- props:
- jvm_enabled: true
- # plugins:
- # rate-limiter.enabled: false
- local:
- enabled: false
- sha512Key: "BA3253876AED6BC22D4A6FF53D8406C6AD864195ED144AB5C87621B6C233B548BAEAE6956DF346EC8C17F5EA10F35EE3CBC514797ED7DDD3145464E2A0BAB413"
-
-logging:
- level:
- root: info
- org.springframework.boot: info
- org.apache.ibatis: info
- org.apache.shenyu.bonuspoint: info
- org.apache.shenyu.lottery: info
- org.apache.shenyu: info
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java b/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
deleted file mode 100644
index a7224b309a..0000000000
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.integrated.test.alibaba.dubbo;
-
-import java.io.IOException;
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
-import org.apache.shenyu.integratedtest.common.dto.DubboTest;
-import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class ApacheDubboPluginTest extends AbstractPluginDataInit {
-
- @BeforeAll
- public static void setup() throws IOException {
- String pluginResult = initPlugin(PluginEnum.DUBBO.getName(), "{\"register\":\"zookeeper://shenyu-zk:2181\"}");
- assertThat(pluginResult, is("success"));
- }
-
- @Test
- public void testFindAll() throws IOException {
- DubboTest dubboTest = HttpHelper.INSTANCE.getHttpService("http://localhost:8899/sdk/dubbo/findAll", null, DubboTest.class);
- assertEquals("hello world shenyu Apache, findAll", dubboTest.getName());
- }
-
- @Test
- public void testFindAllFallBck() throws IOException {
-
- DubboTest dubboTest = HttpHelper.INSTANCE.getHttpService("http://localhost:8899/sdk/dubbo/findAll", null, DubboTest.class);
- assertEquals("fallback", dubboTest.getName());
- }
-
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/pom.xml b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/pom.xml
index c1ff24a150..c408931a20 100644
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/pom.xml
+++ b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/pom.xml
@@ -29,7 +29,6 @@
<modules>
<module>shenyu-plugin-dubbo-common</module>
- <module>shenyu-plugin-alibaba-dubbo</module>
<module>shenyu-plugin-apache-dubbo</module>
</modules>
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/pom.xml b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/pom.xml
deleted file mode 100644
index d8b7474645..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-plugin-dubbo</artifactId>
- <version>2.7.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>shenyu-plugin-alibaba-dubbo</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-plugin-dubbo-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
deleted file mode 100644
index 295143df2c..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPlugin.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo;
-
-import com.alibaba.dubbo.remoting.exchange.ResponseCallback;
-import com.alibaba.dubbo.remoting.exchange.ResponseFuture;
-import com.alibaba.dubbo.rpc.Result;
-import com.alibaba.dubbo.rpc.RpcContext;
-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.ResultEnum;
-import org.apache.shenyu.plugin.alibaba.dubbo.proxy.AlibabaDubboProxyService;
-import org.apache.shenyu.plugin.api.ShenyuPluginChain;
-import org.apache.shenyu.plugin.dubbo.common.AbstractDubboPlugin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.server.ServerWebExchange;
-import reactor.core.publisher.Mono;
-
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Alibaba dubbo plugin.
- */
-public class AlibabaDubboPlugin extends AbstractDubboPlugin {
-
- private static final Logger LOG = LoggerFactory.getLogger(AlibabaDubboPlugin.class);
-
- private final AlibabaDubboProxyService alibabaDubboProxyService;
-
- /**
- * Instantiates a new Dubbo plugin.
- *
- * @param alibabaDubboProxyService the dubbo proxy service
- */
- public AlibabaDubboPlugin(final AlibabaDubboProxyService alibabaDubboProxyService) {
- this.alibabaDubboProxyService = alibabaDubboProxyService;
- }
-
- /**
- * do dubbo invoker.
- *
- * @param exchange exchange the current server exchange {@linkplain ServerWebExchange}
- * @param chain chain the current chain {@linkplain ServerWebExchange}
- * @param selector selector {@linkplain SelectorData}
- * @param rule rule {@linkplain RuleData}
- * @param metaData the medata
- * @param param the param
- * @return {@code Mono<Void>} to indicate when request handling is complete
- */
- @Override
- protected Mono<Void> doDubboInvoker(final ServerWebExchange exchange,
- final ShenyuPluginChain chain,
- final SelectorData selector,
- final RuleData rule,
- final MetaData metaData,
- final String param) {
- RpcContext.getContext().setAttachment(Constants.DUBBO_SELECTOR_ID, selector.getId());
- RpcContext.getContext().setAttachment(Constants.DUBBO_RULE_ID, rule.getId());
- RpcContext.getContext().setAttachment(Constants.DUBBO_REMOTE_ADDRESS, Objects.requireNonNull(exchange.getRequest().getRemoteAddress()).getAddress().getHostAddress());
- return Mono.create(monoSink -> {
- ResponseFuture future = alibabaDubboProxyService.genericInvoker(param, metaData);
- future.setCallback(new ResponseCallback() {
-
- @Override
- public void done(final Object resultObj) {
- assert resultObj instanceof Result;
- Result result = (Result) resultObj;
- if (result.hasException()) {
- this.caught(result.getException());
- return;
- }
- monoSink.success(result.getValue());
- }
-
- @Override
- public void caught(final Throwable ex) {
- LOG.error("dubbo failed using async genericInvoker() metaData={} param={}", metaData, param, ex);
- monoSink.error(ex);
- }
- });
- }).flatMap(response -> {
- exchange.getAttributes().put(Constants.RPC_RESULT, Objects.nonNull(response) ? response : Constants.DUBBO_RPC_RESULT_EMPTY);
- exchange.getAttributes().put(Constants.CLIENT_RESPONSE_RESULT_TYPE, ResultEnum.SUCCESS.getName());
- return chain.execute(exchange);
- });
- }
-
- @Override
- protected void transmitRpcContext(final Map<String, String> rpcContext) {
- rpcContext.forEach(RpcContext.getContext()::setAttachment);
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/AlibabaDubboConfigCache.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/AlibabaDubboConfigCache.java
deleted file mode 100644
index 191b4c7461..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/AlibabaDubboConfigCache.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.cache;
-
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.ConsumerConfig;
-import com.alibaba.dubbo.config.ReferenceConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-import com.alibaba.dubbo.rpc.service.GenericService;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.common.cache.RemovalListener;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.shenyu.common.constant.Constants;
-import org.apache.shenyu.common.dto.MetaData;
-import org.apache.shenyu.common.dto.convert.plugin.DubboRegisterConfig;
-import org.apache.shenyu.common.exception.ShenyuException;
-import org.apache.shenyu.plugin.dubbo.common.cache.DubboConfigCache;
-import org.apache.shenyu.plugin.dubbo.common.cache.DubboParam;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.annotation.Nonnull;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.concurrent.ExecutionException;
-
-/**
- * The type Application config cache.
- */
-public final class AlibabaDubboConfigCache extends DubboConfigCache {
-
- private static final Logger LOG = LoggerFactory.getLogger(AlibabaDubboConfigCache.class);
-
- private ApplicationConfig applicationConfig;
-
- private RegistryConfig registryConfig;
-
- private ConsumerConfig consumerConfig;
-
- private final LoadingCache<String, ReferenceConfig<GenericService>> cache = CacheBuilder.newBuilder()
- .maximumSize(Constants.CACHE_MAX_COUNT)
- .removalListener((RemovalListener<Object, ReferenceConfig<GenericService>>) notification -> {
- ReferenceConfig<GenericService> config = notification.getValue();
- if (Objects.nonNull(config)) {
- // After the configuration change, Dubbo destroys the instance, but does not empty it. If it is not handled,
- // it will get NULL when reinitializing and cause a NULL pointer problem.
- config.destroy();
- }
- })
- .build(new CacheLoader<String, ReferenceConfig<GenericService>>() {
- @Override
- @Nonnull
- public ReferenceConfig<GenericService> load(@Nonnull final String key) {
- return new ReferenceConfig<>();
- }
- });
-
- private AlibabaDubboConfigCache() {
- }
-
- /**
- * Gets instance.
- *
- * @return the instance
- */
- public static AlibabaDubboConfigCache getInstance() {
- return ApplicationConfigCacheInstance.INSTANCE;
- }
-
- /**
- * Init.
- *
- * @param dubboRegisterConfig the dubbo register config
- */
- public void init(final DubboRegisterConfig dubboRegisterConfig) {
- if (Objects.isNull(applicationConfig)) {
- applicationConfig = new ApplicationConfig("shenyu_proxy");
- }
- if (needUpdateRegistryConfig(dubboRegisterConfig)) {
- RegistryConfig registryConfigTemp = new RegistryConfig();
- registryConfigTemp.setProtocol(dubboRegisterConfig.getProtocol());
- registryConfigTemp.setId("shenyu_proxy");
- registryConfigTemp.setRegister(false);
- registryConfigTemp.setAddress(dubboRegisterConfig.getRegister());
- Optional.ofNullable(dubboRegisterConfig.getGroup()).ifPresent(registryConfigTemp::setGroup);
- registryConfig = registryConfigTemp;
- }
- if (Objects.isNull(consumerConfig)) {
- consumerConfig = new ConsumerConfig();
- Optional.ofNullable(dubboRegisterConfig.getThreadpool()).ifPresent(consumerConfig::setThreadpool);
- Optional.ofNullable(dubboRegisterConfig.getCorethreads()).ifPresent(consumerConfig::setCorethreads);
- Optional.ofNullable(dubboRegisterConfig.getThreads()).ifPresent(consumerConfig::setThreads);
- Optional.ofNullable(dubboRegisterConfig.getQueues()).ifPresent(consumerConfig::setQueues);
- }
- }
-
- private boolean needUpdateRegistryConfig(final DubboRegisterConfig dubboRegisterConfig) {
- if (Objects.isNull(registryConfig)) {
- return true;
- }
- return !Objects.equals(dubboRegisterConfig.getProtocol(), registryConfig.getProtocol())
- || !Objects.equals(dubboRegisterConfig.getRegister(), registryConfig.getAddress());
- }
-
- /**
- * Init ref reference config.
- *
- * @param metaData the meta data
- * @return the reference config
- */
- public ReferenceConfig<GenericService> initRef(final MetaData metaData) {
- try {
- ReferenceConfig<GenericService> referenceConfig = cache.get(metaData.getPath());
- if (StringUtils.isNoneBlank(referenceConfig.getInterface())) {
- return referenceConfig;
- }
- } catch (ExecutionException e) {
- LOG.error("init dubbo ref exception", e);
- }
- return build(metaData);
- }
-
- /**
- * Build reference config.
- *
- * @param metaData the meta data
- * @return the reference config
- */
- public ReferenceConfig<GenericService> build(final MetaData metaData) {
- if (Objects.isNull(applicationConfig) || Objects.isNull(registryConfig)) {
- return new ReferenceConfig<>();
- }
- ReferenceConfig<GenericService> reference = new ReferenceConfig<>();
- reference.setGeneric(true);
- reference.setApplication(applicationConfig);
- reference.setRegistry(registryConfig);
- reference.setConsumer(consumerConfig);
- reference.setInterface(metaData.getServiceName());
- // default protocol is dubbo
- reference.setProtocol("dubbo");
- reference.setAsync(true);
- reference.setCheck(false);
- reference.setLoadbalance("gray");
-
- Map<String, String> parameters = new HashMap<>(2);
- parameters.put("dispatcher", "direct");
- reference.setParameters(parameters);
-
- String rpcExt = metaData.getRpcExt();
- DubboParam dubboParam = this.parserToDubboParam(rpcExt);
- if (Objects.nonNull(dubboParam)) {
- if (StringUtils.isNoneBlank(dubboParam.getVersion())) {
- reference.setVersion(dubboParam.getVersion());
- }
- if (StringUtils.isNoneBlank(dubboParam.getGroup())) {
- reference.setGroup(dubboParam.getGroup());
- }
- if (StringUtils.isNoneBlank(dubboParam.getUrl())) {
- reference.setUrl(dubboParam.getUrl());
- }
- if (StringUtils.isNoneBlank(dubboParam.getCluster())) {
- reference.setCluster(dubboParam.getCluster());
- }
- // set dubbo sub protocol
- Optional.ofNullable(dubboParam.getProtocol()).ifPresent(reference::setProtocol);
- Optional.ofNullable(dubboParam.getTimeout()).ifPresent(reference::setTimeout);
- Optional.ofNullable(dubboParam.getRetries()).ifPresent(reference::setRetries);
- Optional.ofNullable(dubboParam.getSent()).ifPresent(reference::setSent);
- }
- try {
- Object obj = reference.get();
- if (Objects.nonNull(obj)) {
- LOG.info("init alibaba dubbo reference success there meteData is :{}", metaData);
- cache.put(metaData.getPath(), reference);
- }
- } catch (Exception e) {
- LOG.error("init alibaba dubbo reference exception", e);
- }
- return reference;
- }
-
- /**
- * Get reference config.
- *
- * @param path the path
- * @return the reference config
- */
- public ReferenceConfig<GenericService> get(final String path) {
- try {
- return cache.get(path);
- } catch (ExecutionException e) {
- throw new ShenyuException(e.getCause());
- }
- }
-
- /**
- * Invalidate.
- *
- * @param path the path
- */
- public void invalidate(final String path) {
- cache.invalidate(path);
- }
-
- /**
- * Invalidate all.
- */
- public void invalidateAll() {
- cache.invalidateAll();
- }
-
- /**
- * The type Application config cache instance.
- */
- static final class ApplicationConfigCacheInstance {
- /**
- * The Instance.
- */
- static final AlibabaDubboConfigCache INSTANCE = new AlibabaDubboConfigCache();
-
- private ApplicationConfigCacheInstance() {
-
- }
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboMetaDataHandler.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboMetaDataHandler.java
deleted file mode 100644
index 42d34b7890..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboMetaDataHandler.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.handler;
-
-import org.apache.shenyu.common.dto.MetaData;
-import org.apache.shenyu.plugin.alibaba.dubbo.cache.AlibabaDubboConfigCache;
-import org.apache.shenyu.plugin.dubbo.common.handler.AbstractDubboMetaDataHandler;
-
-import java.util.Objects;
-
-/**
- * The type Alibaba dubbo meta data handler.
- */
-public class AlibabaDubboMetaDataHandler extends AbstractDubboMetaDataHandler {
-
- @Override
- protected boolean isInitialized(final MetaData metaData) {
- return Objects.nonNull(AlibabaDubboConfigCache.getInstance().get(metaData.getPath()));
- }
-
- @Override
- protected void initReference(final MetaData metaData) {
- AlibabaDubboConfigCache.getInstance().initRef(metaData);
- }
-
- @Override
- protected void updateReference(final MetaData metaData) {
- AlibabaDubboConfigCache.getInstance().build(metaData);
- }
-
- @Override
- protected void invalidateReference(final String path) {
- AlibabaDubboConfigCache.getInstance().invalidate(path);
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java
deleted file mode 100644
index ee55847722..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataHandler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.handler;
-
-import org.apache.shenyu.common.dto.convert.plugin.DubboRegisterConfig;
-import org.apache.shenyu.plugin.alibaba.dubbo.cache.AlibabaDubboConfigCache;
-import org.apache.shenyu.plugin.dubbo.common.handler.AbstractDubboPluginDataHandler;
-
-/**
- * The type Alibaba dubbo plugin data subscriber.
- */
-public class AlibabaDubboPluginDataHandler extends AbstractDubboPluginDataHandler {
-
- @Override
- protected void initConfigCache(final DubboRegisterConfig dubboRegisterConfig) {
- AlibabaDubboConfigCache.getInstance().init(dubboRegisterConfig);
- AlibabaDubboConfigCache.getInstance().invalidateAll();
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboGrayLoadBalance.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboGrayLoadBalance.java
deleted file mode 100644
index 1443c4f2f2..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboGrayLoadBalance.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.proxy;
-
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.extension.ExtensionLoader;
-import com.alibaba.dubbo.rpc.Invocation;
-import com.alibaba.dubbo.rpc.Invoker;
-import com.alibaba.dubbo.rpc.RpcException;
-import com.alibaba.dubbo.rpc.cluster.LoadBalance;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.shenyu.common.constant.Constants;
-import org.apache.shenyu.common.dto.convert.rule.impl.DubboRuleHandle;
-import org.apache.shenyu.common.dto.convert.selector.DubboUpstream;
-import org.apache.shenyu.loadbalancer.cache.UpstreamCacheManager;
-import org.apache.shenyu.loadbalancer.entity.Upstream;
-import org.apache.shenyu.loadbalancer.factory.LoadBalancerFactory;
-import org.apache.shenyu.plugin.alibaba.dubbo.handler.AlibabaDubboPluginDataHandler;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * AlibabaDubboGrayLoadBalance.
- */
-public class AlibabaDubboGrayLoadBalance implements LoadBalance {
-
- @Override
- public <T> Invoker<T> select(final List<Invoker<T>> invokers, final URL url, final Invocation invocation) throws RpcException {
- String shenyuSelectorId = invocation.getAttachment(Constants.DUBBO_SELECTOR_ID);
- String shenyuRuleId = invocation.getAttachment(Constants.DUBBO_RULE_ID);
- String remoteAddressIp = invocation.getAttachment(Constants.DUBBO_REMOTE_ADDRESS);
- List<DubboUpstream> dubboUpstreams = AlibabaDubboPluginDataHandler.SELECTOR_CACHED_HANDLE.get().obtainHandle(shenyuSelectorId);
- DubboRuleHandle dubboRuleHandle = AlibabaDubboPluginDataHandler.RULE_CACHED_HANDLE.get().obtainHandle(shenyuRuleId);
- // if gray list is not empty,just use load balance to choose one.
- if (CollectionUtils.isNotEmpty(dubboUpstreams)) {
- Upstream upstream = LoadBalancerFactory.selector(UpstreamCacheManager.getInstance().findUpstreamListBySelectorId(shenyuSelectorId), dubboRuleHandle.getLoadBalance(), remoteAddressIp);
- if (StringUtils.isBlank(upstream.getUrl()) && StringUtils.isBlank(upstream.getGroup()) && StringUtils.isBlank(upstream.getVersion())) {
- return select(invokers, url, invocation, dubboRuleHandle.getLoadBalance());
- }
- // url is the first level, then is group, the version is the lowest.
- final List<Invoker<T>> invokerGrays = invokers.stream().filter(each -> {
- if (StringUtils.isNotBlank(upstream.getUrl())) {
- URL eachUrl = each.getUrl();
- return eachUrl.getAddress().equals(upstream.getUrl());
- }
- return true;
- }).filter(each -> {
- if (StringUtils.isNotBlank(upstream.getGroup())) {
- final URL eachUrl = each.getUrl();
- return upstream.getGroup().equals(eachUrl.getParameter(Constants.GROUP));
- }
- return true;
- }).filter(each -> {
- if (StringUtils.isNotBlank(upstream.getVersion())) {
- final URL eachUrl = each.getUrl();
- return upstream.getVersion().equals(eachUrl.getParameter(Constants.VERSION));
- }
- return true;
- }).collect(Collectors.toList());
- if (CollectionUtils.isEmpty(invokerGrays)) {
- return select(invokers, url, invocation, dubboRuleHandle.getLoadBalance());
- }
- return select(invokerGrays, url, invocation, dubboRuleHandle.getLoadBalance());
- }
- return select(invokers, url, invocation, dubboRuleHandle.getLoadBalance());
- }
-
- private <T> Invoker<T> select(final List<Invoker<T>> invokers, final URL url, final Invocation invocation, final String loadbalance) {
- return ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(loadbalance).select(invokers, url, invocation);
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java
deleted file mode 100644
index 9ab66261e6..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/proxy/AlibabaDubboProxyService.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.proxy;
-
-import com.alibaba.dubbo.config.ReferenceConfig;
-import com.alibaba.dubbo.remoting.exchange.ResponseFuture;
-import com.alibaba.dubbo.rpc.RpcContext;
-import com.alibaba.dubbo.rpc.protocol.dubbo.FutureAdapter;
-import com.alibaba.dubbo.rpc.service.GenericException;
-import com.alibaba.dubbo.rpc.service.GenericService;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.shenyu.common.dto.MetaData;
-import org.apache.shenyu.common.exception.ShenyuException;
-import org.apache.shenyu.common.utils.ParamCheckUtils;
-import org.apache.shenyu.plugin.alibaba.dubbo.cache.AlibabaDubboConfigCache;
-import org.apache.shenyu.plugin.dubbo.common.param.DubboParamResolveService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Objects;
-
-/**
- * Alibaba dubbo proxy service is use GenericService.
- */
-public class AlibabaDubboProxyService {
-
- private static final Logger LOG = LoggerFactory.getLogger(AlibabaDubboProxyService.class);
-
- private final DubboParamResolveService dubboParamResolveService;
-
- /**
- * Instantiates a new Dubbo proxy service.
- *
- * @param dubboParamResolveService the generic param resolve service
- */
- public AlibabaDubboProxyService(final DubboParamResolveService dubboParamResolveService) {
- this.dubboParamResolveService = dubboParamResolveService;
- }
-
- /**
- * Generic invoker object.
- *
- * @param body the body
- * @param metaData the meta data
- * @return the object
- * @throws ShenyuException the shenyu exception
- */
- public ResponseFuture genericInvoker(final String body, final MetaData metaData) throws ShenyuException {
- ReferenceConfig<GenericService> reference = AlibabaDubboConfigCache.getInstance().get(metaData.getPath());
- if (Objects.isNull(reference) || StringUtils.isEmpty(reference.getInterface())) {
- AlibabaDubboConfigCache.getInstance().invalidate(metaData.getPath());
- reference = AlibabaDubboConfigCache.getInstance().initRef(metaData);
- }
- try {
- GenericService genericService = reference.get();
- Pair<String[], Object[]> pair;
- if (StringUtils.isBlank(metaData.getParameterTypes()) || ParamCheckUtils.bodyIsEmpty(body)) {
- pair = new ImmutablePair<>(new String[]{}, new Object[]{});
- } else {
- pair = dubboParamResolveService.buildParameter(body, metaData.getParameterTypes());
- }
- genericService.$invoke(metaData.getMethodName(), pair.getLeft(), pair.getRight());
- } catch (GenericException e) {
- LOG.error("dubbo invoker have exception", e);
- throw new ShenyuException(e.getExceptionMessage());
- }
-
- FutureAdapter<?> adapter = (FutureAdapter<?>) RpcContext.getContext().getFuture();
- return adapter.getFuture();
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/threadpool/SharedThreadPool.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/threadpool/SharedThreadPool.java
deleted file mode 100644
index ea390843ce..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/java/org/apache/shenyu/plugin/alibaba/dubbo/threadpool/SharedThreadPool.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.threadpool;
-
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.threadpool.ThreadPool;
-import org.apache.shenyu.common.concurrent.ShenyuThreadPoolExecutor;
-import org.apache.shenyu.common.exception.ShenyuException;
-import org.apache.shenyu.plugin.api.utils.SpringBeanUtils;
-import org.springframework.beans.factory.NoSuchBeanDefinitionException;
-
-import java.util.concurrent.Executor;
-
-/**
- * The type Shared Thread Pool.
- */
-public class SharedThreadPool implements ThreadPool {
- @Override
- public Executor getExecutor(final URL url) {
- try {
- return SpringBeanUtils.getInstance().getBean(ShenyuThreadPoolExecutor.class);
- } catch (NoSuchBeanDefinitionException t) {
- throw new ShenyuException("shared thread pool is not enable, config ${shenyu.sharedPool.enable} in your xml/yml !", t);
- }
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.threadpool.ThreadPool b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.threadpool.ThreadPool
deleted file mode 100644
index 96df114b56..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.threadpool.ThreadPool
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-shared=org.apache.shenyu.plugin.alibaba.dubbo.threadpool.SharedThreadPool
-default=org.apache.dubbo.common.threadpool.support.cached.CachedThreadPool
\ No newline at end of file
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.LoadBalance b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.LoadBalance
deleted file mode 100644
index 83aa67fe7d..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.LoadBalance
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-gray=org.apache.shenyu.plugin.alibaba.dubbo.proxy.AlibabaDubboGrayLoadBalance
\ No newline at end of file
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java
deleted file mode 100644
index 087d5c64b9..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/AlibabaDubboPluginTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo;
-
-import com.alibaba.dubbo.remoting.exchange.support.SimpleFuture;
-import com.alibaba.dubbo.rpc.RpcContext;
-import com.alibaba.dubbo.rpc.RpcResult;
-import com.google.common.collect.Maps;
-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.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.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.Mock;
-import org.mockito.MockedStatic;
-import org.mockito.junit.jupiter.MockitoExtension;
-import org.mockito.junit.jupiter.MockitoSettings;
-import org.mockito.quality.Strictness;
-import org.springframework.mock.http.server.reactive.MockServerHttpRequest;
-import org.springframework.mock.web.server.MockServerWebExchange;
-import org.springframework.web.server.ServerWebExchange;
-import reactor.core.publisher.Mono;
-import reactor.test.StepVerifier;
-
-import java.net.InetSocketAddress;
-import java.util.Map;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.mockStatic;
-import static org.mockito.Mockito.when;
-
-/**
- * Test case for AlibabaDubboPlugin.
- */
-@ExtendWith(MockitoExtension.class)
-@MockitoSettings(strictness = Strictness.LENIENT)
-public final class AlibabaDubboPluginTest {
- @Mock
- private AlibabaDubboProxyService mockAlibabaDubboProxyService;
-
- private AlibabaDubboPlugin alibabaDubboPluginUnderTest;
-
- private MetaData metaData;
-
- @BeforeEach
- public void setUp() {
- metaData = new MetaData();
- metaData.setId("1332017966661636096");
- metaData.setAppName("dubbo");
- metaData.setPath("/dubbo/findAll");
- metaData.setServiceName("org.apache.shenyu.test.dubbo.api.service.DubboTestService");
- metaData.setMethodName("findAll");
- metaData.setRpcType(RpcTypeEnum.DUBBO.getName());
- when(mockAlibabaDubboProxyService.genericInvoker(null, metaData))
- .thenReturn(new SimpleFuture(new RpcResult(metaData.getId())));
- alibabaDubboPluginUnderTest = new AlibabaDubboPlugin(mockAlibabaDubboProxyService);
- }
-
- @Test
- public void testNamed() {
- final String result = alibabaDubboPluginUnderTest.named();
- assertEquals(PluginEnum.DUBBO.getName(), result);
- }
-
- @Test
- public void testSkip() {
- final ServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("localhost").build());
- ShenyuContext context = mock(ShenyuContext.class);
- when(context.getRpcType()).thenReturn(RpcTypeEnum.DUBBO.getName());
- exchange.getAttributes().put(Constants.CONTEXT, context);
- exchange.getAttributes().put(Constants.META_DATA, metaData);
-
- final boolean result = alibabaDubboPluginUnderTest.skip(exchange);
-
- assertFalse(result);
- }
-
- @Test
- public void testGetOrder() {
- final int result = alibabaDubboPluginUnderTest.getOrder();
-
- assertEquals(PluginEnum.DUBBO.getCode(), result);
- }
-
- @Test
- public void testAlibabaDubboPlugin() {
- final ServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("localhost").remoteAddress(new InetSocketAddress("127.0.0.1", 20880)).build());
- ShenyuContext context = mock(ShenyuContext.class);
- when(context.getRpcType()).thenReturn(RpcTypeEnum.DUBBO.getName());
- exchange.getAttributes().put(Constants.CONTEXT, context);
- exchange.getAttributes().put(Constants.META_DATA, metaData);
- ShenyuPluginChain chain = mock(ShenyuPluginChain.class);
- when(chain.execute(exchange)).thenReturn(Mono.empty());
- RuleData data = mock(RuleData.class);
- SelectorData selectorData = mock(SelectorData.class);
-
- Mono<Void> voidMono = alibabaDubboPluginUnderTest.doExecute(exchange, chain, selectorData, data);
-
- StepVerifier.create(voidMono).expectSubscription().verifyComplete();
- }
-
- @Test
- public void testAlibabaDubboPluginMetaDataNull() {
- final ServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("localhost").remoteAddress(new InetSocketAddress("127.0.0.1", 20880)).build());
- ShenyuContext context = mock(ShenyuContext.class);
- when(context.getRpcType()).thenReturn(RpcTypeEnum.DUBBO.getName());
- exchange.getAttributes().put(Constants.CONTEXT, context);
- exchange.getAttributes().put(Constants.META_DATA, new MetaData());
- ShenyuPluginChain chain = mock(ShenyuPluginChain.class);
- when(chain.execute(exchange)).thenReturn(Mono.empty());
- RuleData data = mock(RuleData.class);
- SelectorData selectorData = mock(SelectorData.class);
-
- try (MockedStatic<ShenyuResultWrap> shenyuResultWrapMockedStatic = mockStatic(ShenyuResultWrap.class)) {
- shenyuResultWrapMockedStatic.when(() -> ShenyuResultWrap
- .error(exchange, ShenyuResultEnum.DUBBO_HAVE_BODY_PARAM))
- .thenReturn(new Object());
-
- Mono<Void> voidMono = alibabaDubboPluginUnderTest.doExecute(exchange, chain, selectorData, data);
- StepVerifier.create(voidMono).expectSubscription().verifyComplete();
- }
- }
-
- @Test
- public void testTransmitRpcContext() {
- Map<String, String> stringStringMap = Maps.newHashMapWithExpectedSize(1);
- stringStringMap.put("test", "test");
- alibabaDubboPluginUnderTest.transmitRpcContext(stringStringMap);
- assertEquals(RpcContext.getContext().getAttachment("test"), "test");
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/AlibabaDubboConfigCacheTest.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/AlibabaDubboConfigCacheTest.java
deleted file mode 100644
index 39b19667e0..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/cache/AlibabaDubboConfigCacheTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.cache;
-
-import com.alibaba.dubbo.config.ReferenceConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-import org.apache.shenyu.common.dto.MetaData;
-import org.apache.shenyu.common.dto.convert.plugin.DubboRegisterConfig;
-import org.apache.shenyu.common.utils.GsonUtils;
-import org.apache.shenyu.plugin.dubbo.common.cache.DubboParam;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.junit.jupiter.MockitoExtension;
-import org.mockito.junit.jupiter.MockitoSettings;
-import org.mockito.quality.Strictness;
-
-import java.lang.reflect.Field;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.fail;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-
-/**
- * The Test Case For AlibabaDubboConfigCache.
- */
-@ExtendWith(MockitoExtension.class)
-@MockitoSettings(strictness = Strictness.LENIENT)
-public final class AlibabaDubboConfigCacheTest {
-
- private AlibabaDubboConfigCache alibabaDubboConfigCache;
-
- @BeforeEach
- public void setUp() {
- alibabaDubboConfigCache = AlibabaDubboConfigCache.getInstance();
- }
-
- @Test
- public void getInstance() {
- assertNotNull(this.alibabaDubboConfigCache);
- }
-
- @Test
- public void testInit() {
- DubboRegisterConfig dubboRegisterConfig = new DubboRegisterConfig();
- dubboRegisterConfig.setRegister("zookeeper://127.0.0.1:2181");
- dubboRegisterConfig.setProtocol("dubbo");
- this.alibabaDubboConfigCache.init(dubboRegisterConfig);
-
- RegistryConfig registryConfig = null;
- try {
- Field registryConfigField = AlibabaDubboConfigCache.class.getDeclaredField("registryConfig");
- registryConfigField.setAccessible(true);
- Object config = registryConfigField.get(this.alibabaDubboConfigCache);
- assertNotNull(config);
- registryConfig = (RegistryConfig) config;
- } catch (NoSuchFieldException | IllegalAccessException e) {
- fail();
- }
-
- DubboRegisterConfig dubboRegisterConfig1 = new DubboRegisterConfig();
- dubboRegisterConfig1.setRegister("zookeeper://127.0.0.2:2181");
- dubboRegisterConfig1.setProtocol("dubbo");
- this.alibabaDubboConfigCache.init(dubboRegisterConfig1);
-
- RegistryConfig registryConfig1 = null;
- try {
- Field registryConfigField = AlibabaDubboConfigCache.class.getDeclaredField("registryConfig");
- registryConfigField.setAccessible(true);
- Object config = registryConfigField.get(this.alibabaDubboConfigCache);
- assertNotNull(config);
- registryConfig1 = (RegistryConfig) config;
- } catch (NoSuchFieldException | IllegalAccessException e) {
- fail();
- }
- assertNotSame(registryConfig, registryConfig1);
- }
-
- @Test
- public void testInitRef() {
- MetaData metaData = new MetaData();
- metaData.setPath("/test");
- AlibabaDubboConfigCache alibabaDubboConfigCacheMock = mock(AlibabaDubboConfigCache.class);
- when(alibabaDubboConfigCacheMock.initRef(metaData))
- .thenReturn(new ReferenceConfig<>());
- assertNotNull(alibabaDubboConfigCacheMock.initRef(metaData));
- }
-
- @Test
- public void testGet() {
- assertNotNull(this.alibabaDubboConfigCache.get("/test"));
- }
-
- @Test
- public void testBuild() {
- DubboParam dubboParam = new DubboParam();
- dubboParam.setVersion("2.6.5");
- dubboParam.setGroup("Group");
- dubboParam.setUrl("http://192.168.55.113/dubbo");
- MetaData metaData = new MetaData();
- metaData.setRpcExt(GsonUtils.getInstance().toJson(dubboParam));
- AlibabaDubboConfigCache alibabaDubboConfigCacheMock = mock(AlibabaDubboConfigCache.class);
- when(alibabaDubboConfigCacheMock.build(metaData))
- .thenReturn(new ReferenceConfig<>());
- assertNotNull(alibabaDubboConfigCacheMock.build(metaData));
- }
-
- @Test
- public void testInvalidate() {
- this.alibabaDubboConfigCache.invalidate("/test");
- this.alibabaDubboConfigCache.invalidateAll();
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboMetaDataHandlerTest.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboMetaDataHandlerTest.java
deleted file mode 100644
index 7cd1c2c445..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboMetaDataHandlerTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.handler;
-
-import org.apache.shenyu.common.dto.MetaData;
-import org.apache.shenyu.common.enums.RpcTypeEnum;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.junit.jupiter.MockitoExtension;
-import org.mockito.junit.jupiter.MockitoSettings;
-import org.mockito.quality.Strictness;
-
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.mock;
-
-/**
- * The Test Case For AlibabaDubboMetaDataHandler.
- */
-@ExtendWith(MockitoExtension.class)
-@MockitoSettings(strictness = Strictness.LENIENT)
-public final class AlibabaDubboMetaDataHandlerTest {
-
- private AlibabaDubboMetaDataHandler alibabaDubboMetaDataHandler;
-
- private MetaData metaData;
-
- @BeforeEach
- public void setUp() {
- alibabaDubboMetaDataHandler = new AlibabaDubboMetaDataHandler();
- metaData = new MetaData();
- metaData.setId("1332017966661636096");
- metaData.setAppName("dubbo");
- metaData.setPath("/dubbo/findAll");
- metaData.setServiceName("org.apache.shenyu.test.dubbo.api.service.DubboTestService");
- metaData.setMethodName("findAll");
- metaData.setRpcType(RpcTypeEnum.DUBBO.getName());
- metaData.setRpcExt("{\"group\":\"Group\",\"version\":\"2.6.5\",\"url\":\"http://192.168.55.113/dubbo\",\"cluster\":\"failover\"}");
- metaData.setParameterTypes("parameterTypes");
- }
-
- @Test
- public void testOnSubscribe() {
- alibabaDubboMetaDataHandler.handle(metaData);
- MetaData metaData = MetaData.builder()
- .id("1332017966661636096")
- .appName("dubbo")
- .path("/dubbo/findAll")
- .serviceName("org.apache.shenyu.test.dubbo.api.service.DubboTestService")
- .methodName("findById")
- .rpcType(RpcTypeEnum.DUBBO.getName())
- .rpcExt("{\"group\":\"Group\",\"version\":\"2.6.5\",\"url\":\"http://192.168.55.113/dubbo\",\"cluster\":\"failover\"}")
- .parameterTypes("parameterTypes").build();
- AlibabaDubboMetaDataHandler alibabaDubboMetaDataHandlerMock = mock(AlibabaDubboMetaDataHandler.class);
- doNothing().when(alibabaDubboMetaDataHandlerMock).handle(metaData);
- alibabaDubboMetaDataHandlerMock.handle(metaData);
- // hit else
- alibabaDubboMetaDataHandler.handle(metaData);
- alibabaDubboMetaDataHandler.remove(metaData);
- }
-}
diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java
deleted file mode 100644
index b4a8b81229..0000000000
--- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-alibaba-dubbo/src/test/java/org/apache/shenyu/plugin/alibaba/dubbo/handler/AlibabaDubboPluginDataTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shenyu.plugin.alibaba.dubbo.handler;
-
-import org.apache.shenyu.common.dto.MetaData;
-import org.apache.shenyu.common.dto.PluginData;
-import org.apache.shenyu.common.dto.convert.plugin.DubboRegisterConfig;
-import org.apache.shenyu.common.enums.PluginEnum;
-import org.apache.shenyu.common.utils.Singleton;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.MethodOrderer;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestMethodOrder;
... 921 lines suppressed ...