diff --git a/.github/scripts/check-registry-dependencies.py b/.github/scripts/check-registry-dependencies.py
index ff233ff0c332..f968282c8c56 100644
--- a/.github/scripts/check-registry-dependencies.py
+++ b/.github/scripts/check-registry-dependencies.py
@@ -18,8 +18,8 @@
import sys
from pathlib import Path
-PROVIDERS = ("zookeeper", "etcd", "nacos", "apollo", "eureka", "kubernetes")
-COMPATIBILITY_PROVIDERS = set(PROVIDERS) - {"apollo"}
+PROVIDERS = ("zookeeper", "etcd", "nacos", "eureka", "kubernetes")
+COMPATIBILITY_PROVIDERS = set(PROVIDERS)
LEAN_MODULES = (
"shenyu-registry/shenyu-registry-api",
"shenyu-registry/shenyu-registry-core",
diff --git a/README.md b/README.md
index 408278893cd9..d5da9a8f21ed 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ Apache ShenYu is a Java-based gateway for service proxying, protocol conversion,
| Registration and discovery | Client SDKs register service addresses and API metadata with Admin. Registry integrations support discovery; an optional Kubernetes controller reconciles Ingress and Endpoints resources. |
| Security and traffic control | WAF, signing, authentication plugins, load balancing, rate limiting, and fault tolerance through Resilience4j and Sentinel; deprecated Hystrix remains available as an external plugin (see [plugin-store-hystrix](docs/plugin-store-hystrix.md)). |
| Caching and transformation | In-memory or Redis-backed response caching, URL rewriting, redirection, and request/response transformation. |
-| Dynamic configuration | Admin persists plugins, selectors, rules, metadata, and authentication data. WebSocket sync is the default; HTTP long polling, ZooKeeper, Nacos, and etcd are available. Apollo remains available during its deprecation release and is planned to move to an external extension (see [Apollo migration](docs/plugin-store-apollo.md)). Consul sync is available as an external extension (see [plugin-store-consul](docs/plugin-store-consul.md)). Gateway replicas apply updates to their local caches. |
+| Dynamic configuration | Admin persists plugins, selectors, rules, metadata, and authentication data. WebSocket sync is the default; HTTP long polling, ZooKeeper, Nacos, and etcd are available. Apollo sync and registry are available as an external extension (see [Apollo migration](docs/plugin-store-apollo.md)). Consul sync is available as an external extension (see [plugin-store-consul](docs/plugin-store-consul.md)). Gateway replicas apply updates to their local caches. |
| Observability | Metrics and logging plugins, including Kafka and Elasticsearch destinations; email and DingTalk alerts from Admin. |
| AI and MCP | AI proxy, prompt processing, token limits, sensitive-word filtering, AI request/response transformation, and an MCP server plugin with SSE and Streamable HTTP. |
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 393a0bb1c4d0..84a968bc8edc 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -2,6 +2,11 @@
### API Changes
+- The planned later Apollo cutover retains the `apollo` type, stored keys and
+ `ApolloPathConstants` compatibility shim (#7599). It must not merge in the
+ deprecation release; the preceding released cycle and external publication
+ remain required. See [the migration guide](docs/plugin-store-apollo.md).
+
- WASM loaders support opt-in startup execution deadlines and per-instance linear-memory
ceilings. Defaults remain disabled. Timed execution owns bounded workers, propagates
interruption and replaces interrupted instances after physical exit. See
diff --git a/docs/plugin-store-apollo.md b/docs/plugin-store-apollo.md
index 1c6bd65baeb2..79b8056f9da6 100644
--- a/docs/plugin-store-apollo.md
+++ b/docs/plugin-store-apollo.md
@@ -18,12 +18,13 @@ limitations under the License.
## Status and deprecation cycle
-Apollo is currently an optional, supported in-tree integration. Issue [#7599](https://github.com/apache/shenyu/issues/7599)
+This source branch prepares the later removal of Apollo from the core reactor.
+The published deprecation release must retain its in-tree integration. Issue [#7599](https://github.com/apache/shenyu/issues/7599)
proposes transferring its registry, data-sync, Admin listener and gateway starter to
[plugin-store](https://github.com/apache/shenyu-plugin-store), extending [#7306](https://github.com/apache/shenyu/issues/7306).
-This guide is the advance deprecation notice: the in-tree modules remain available
-for the release carrying this notice. No removal release has been selected.
-The separate removal PR is a draft and must not be merged in that deprecation release.
+The separate deprecation PR publishes the advance notice and this guide while
+retaining all four modules for that release. No removal release has been selected.
+The separate removal PR can be reviewed in advance and must not be merged in that deprecation release.
| Stage | Required action |
| --- | --- |
diff --git a/pom.xml b/pom.xml
index 02b102a0a168..db5b9ae329c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -202,7 +202,6 @@
2.9.34.1.59.2
- 2.1.01.7.11.8.36.1.2.RELEASE
@@ -429,18 +428,6 @@
${zookeeper.version}
-
- com.ctrip.framework.apollo
- apollo-client
- ${apollo.version}
-
-
-
- com.ctrip.framework.apollo
- apollo-openapi
- ${apollo.version}
-
-
com.github.pagehelperpagehelper
diff --git a/shenyu-admin-listener/pom.xml b/shenyu-admin-listener/pom.xml
index 0ff72ea20c7f..5330a3997004 100644
--- a/shenyu-admin-listener/pom.xml
+++ b/shenyu-admin-listener/pom.xml
@@ -29,7 +29,6 @@
shenyu-admin-listener-api
- shenyu-admin-listener-apolloshenyu-admin-listener-etcdshenyu-admin-listener-nacosshenyu-admin-listener-zookeeper
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/pom.xml b/shenyu-admin-listener/shenyu-admin-listener-apollo/pom.xml
deleted file mode 100644
index 1fe47c641b22..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
- 4.0.0
-
- org.apache.shenyu
- shenyu-admin-listener
- 2.7.3-SNAPSHOT
-
-
- shenyu-admin-listener-apollo
-
-
-
- com.ctrip.framework.apollo
- apollo-openapi
-
-
-
- org.apache.shenyu
- shenyu-admin-listener-api
- ${project.version}
-
-
-
- org.springframework.boot
- spring-boot-starter-web
- provided
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- ${maven-shade-plugin.version}
-
-
-
-
- package
-
- shade
-
-
-
-
-
-
-
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/config/ApolloSyncConfiguration.java b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/config/ApolloSyncConfiguration.java
deleted file mode 100644
index 755c79439499..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/config/ApolloSyncConfiguration.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.admin.config;
-
-import org.apache.shenyu.admin.config.properties.ApolloProperties;
-import org.apache.shenyu.admin.listener.DataChangedInit;
-import org.apache.shenyu.admin.listener.DataChangedListener;
-import org.apache.shenyu.admin.listener.apollo.ApolloClient;
-import org.apache.shenyu.admin.listener.apollo.ApolloDataChangedInit;
-import org.apache.shenyu.admin.listener.apollo.ApolloDataChangedListener;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * the type apollo listener.
- */
-@Configuration
-@ConditionalOnProperty(prefix = "shenyu.sync.apollo", name = "meta")
-@EnableConfigurationProperties(ApolloProperties.class)
-public class ApolloSyncConfiguration {
-
-
- /**
- * init Consul client.
- *
- * @param apolloProperties the apollo properties
- * @return apollo client
- */
- @Bean
- public ApolloClient apolloClient(final ApolloProperties apolloProperties) {
- return new ApolloClient(apolloProperties);
- }
-
- /**
- * Config event listener data changed listener.
- *
- * @param apolloClient the apollo client
- * @return the data changed listener
- */
- @Bean
- @ConditionalOnMissingBean(ApolloDataChangedListener.class)
- public DataChangedListener apolloDataChangeListener(final ApolloClient apolloClient) {
- return new ApolloDataChangedListener(apolloClient);
- }
-
- /**
- * apollo data init.
- *
- * @param apolloClient the apollo client
- * @return the apollo data init
- */
- @Bean
- @ConditionalOnMissingBean(ApolloDataChangedInit.class)
- public DataChangedInit apolloDataChangeInit(final ApolloClient apolloClient) {
- return new ApolloDataChangedInit(apolloClient);
- }
-
-}
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/config/properties/ApolloProperties.java b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/config/properties/ApolloProperties.java
deleted file mode 100644
index b1a100ff44f0..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/config/properties/ApolloProperties.java
+++ /dev/null
@@ -1,196 +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.admin.config.properties;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-@ConfigurationProperties("shenyu.sync.apollo")
-public class ApolloProperties {
-
- /**
- * appId.
- */
- private String appId;
-
- /**
- * apollo config service url.
- */
- private String meta;
-
- /**
- * portal url.
- * e.g. localhost:8080
- */
- private String portalUrl;
-
- /**
- * env.
- * e.g. ENV
- */
- private String env;
-
- /**
- * cluster name.
- */
- private String clusterName;
-
- /**
- * namespace name.
- */
- private String namespace;
-
- /**
- * open api use token.
- */
- private String token;
-
- /**
- * operatorUser.
- */
- private String operatorUser;
-
- /**
- * get appId.
- * @return appId
- */
- public String getAppId() {
- return appId;
- }
-
- /**
- * set app id.
- * @param appId app id
- */
- public void setAppId(final String appId) {
- this.appId = appId;
- }
-
- /**
- * get config service url.
- * @return config service url
- */
- public String getMeta() {
- return meta;
- }
-
- /**
- * set config service url.
- * @param meta config service url
- */
- public void setMeta(final String meta) {
- this.meta = meta;
- }
-
- /**
- * get portal url.
- * @return portal url
- */
- public String getPortalUrl() {
- return portalUrl;
- }
-
- /**
- * set portal url.
- * @param portalUrl portal url
- */
- public void setPortalUrl(final String portalUrl) {
- this.portalUrl = portalUrl;
- }
-
- /**
- * get env.
- * @return env
- */
- public String getEnv() {
- return env;
- }
-
- /**
- * set env.
- * @param env env
- */
- public void setEnv(final String env) {
- this.env = env;
- }
-
- /**
- * get cluster name.
- * @return cluster name
- */
- public String getClusterName() {
- return clusterName;
- }
-
- /**
- * set cluster name.
- * @param clusterName cluster name
- */
- public void setClusterName(final String clusterName) {
- this.clusterName = clusterName;
- }
-
- /**
- * get namespace name.
- * @return namespace name
- */
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * set namespace name.
- * @param namespace namespace name
- */
- public void setNamespace(final String namespace) {
- this.namespace = namespace;
- }
-
- /**
- * get token.
- * @return token
- */
- public String getToken() {
- return token;
- }
-
- /**
- * set token.
- * @param token token
- */
- public void setToken(final String token) {
- this.token = token;
- }
-
- /**
- * operatorUser.
- *
- * @return OperatorUser
- */
- public String getOperatorUser() {
- return operatorUser;
- }
-
- /**
- * set operatorUser.
- *
- * @param operatorUser operatorUser
- */
- public void setOperatorUser(final String operatorUser) {
- this.operatorUser = operatorUser;
- }
-}
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloClient.java b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloClient.java
deleted file mode 100644
index 580b942ed0fc..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloClient.java
+++ /dev/null
@@ -1,149 +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.admin.listener.apollo;
-
-import com.ctrip.framework.apollo.openapi.client.ApolloOpenApiClient;
-import com.ctrip.framework.apollo.openapi.dto.NamespaceReleaseDTO;
-import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
-import org.apache.shenyu.admin.config.properties.ApolloProperties;
-import org.apache.shenyu.common.exception.ShenyuException;
-import org.apache.shenyu.common.utils.GsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Date;
-import java.util.Objects;
-import java.util.Optional;
-
-/**
- * apollo open-api client.
- */
-public class ApolloClient {
-
- private static final Logger LOG = LoggerFactory.getLogger(ApolloClient.class);
-
- private final String operatorUser;
-
- private final ApolloProperties apolloConfig;
-
- private final ApolloOpenApiClient apolloOpenApiClient;
-
- public ApolloClient(final ApolloProperties apolloConfig) {
- this.apolloConfig = apolloConfig;
-
- this.apolloOpenApiClient = ApolloOpenApiClient
- .newBuilder()
- .withPortalUrl(apolloConfig.getPortalUrl())
- .withToken(apolloConfig.getToken())
- .build();
- operatorUser = Optional.ofNullable(apolloConfig.getOperatorUser()).orElse("apollo");
- }
-
- /**
- * get item value.
- * @param key item key
- * @return item value
- */
- public String getItemValue(final String key) {
- OpenItemDTO openItemDTO = this.apolloOpenApiClient.getItem(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- key);
- if (Objects.isNull(openItemDTO)) {
- return null;
- }
- if (openItemDTO.getKey().equals("timeout")) {
- LOG.error("apollo client getItemValue time out");
- throw new ShenyuException("apollo client getItemValue time out");
- }
- return openItemDTO.getValue();
- }
-
-
- /**
- * removeItemKey.
- *
- * @param key key
- */
- public void removeItemKey(final String key) {
- this.apolloOpenApiClient.removeItem(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- key, operatorUser);
- }
-
- /**
- * create or update item into namespace.
- * @param key item key
- * @param value item value
- * @param comment item comment
- */
- public void createOrUpdateItem(final String key, final Object value, final String comment) {
- this.createOrUpdateItem(key, GsonUtils.getInstance().toJson(value), comment);
- }
-
- /**
- * create or update item into namespace.
- * @param key item key
- * @param value item value
- * @param comment item comment
- */
- public void createOrUpdateItem(final String key, final String value, final String comment) {
- OpenItemDTO openItemDTO = new OpenItemDTO();
- openItemDTO.setKey(key);
- openItemDTO.setValue(value);
- openItemDTO.setComment(comment);
- openItemDTO.setDataChangeCreatedBy(operatorUser);
- openItemDTO.setDataChangeLastModifiedBy(operatorUser);
- Date now = new Date();
- openItemDTO.setDataChangeCreatedTime(now);
- openItemDTO.setDataChangeLastModifiedTime(now);
-
- this.apolloOpenApiClient.createOrUpdateItem(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- openItemDTO
- );
- }
-
- /**
- * publish item list in namespace.
- * @param releaseTitle publish release title
- * @param releaseComment publish release comment
- */
- public void publishNamespace(final String releaseTitle, final String releaseComment) {
- NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO();
- namespaceReleaseDTO.setReleaseTitle(releaseTitle);
- namespaceReleaseDTO.setReleaseComment(releaseComment);
- namespaceReleaseDTO.setReleasedBy(operatorUser);
-
- this.apolloOpenApiClient.publishNamespace(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- namespaceReleaseDTO
- );
- }
-}
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloDataChangedInit.java b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloDataChangedInit.java
deleted file mode 100644
index ee1090b03cf9..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloDataChangedInit.java
+++ /dev/null
@@ -1,65 +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.admin.listener.apollo;
-
-import org.apache.shenyu.admin.listener.AbstractDataChangedInit;
-import org.apache.shenyu.admin.listener.utils.NodeDataPathUtils;
-import org.apache.shenyu.common.constant.ApolloPathConstants;
-
-import java.util.Objects;
-import java.util.stream.Stream;
-
-/**
- * the type apollo data change init.
- *
- * @since 2.6.0
- */
-public class ApolloDataChangedInit extends AbstractDataChangedInit {
- private final ApolloClient apolloClient;
-
- /**
- * Instantiates a new apollo data changed init.
- *
- * @param apolloClient the apollo client
- */
- public ApolloDataChangedInit(final ApolloClient apolloClient) {
- this.apolloClient = apolloClient;
- }
-
- /**
- * not exist.
- *
- * @return true if not exist
- */
- @Override
- protected boolean notExist() {
- return Stream.of(ApolloPathConstants.PLUGIN_DATA_ID, ApolloPathConstants.AUTH_DATA_ID, ApolloPathConstants.META_DATA_ID, ApolloPathConstants.PROXY_SELECTOR_DATA_ID)
- .map(NodeDataPathUtils::appendListStuff)
- .allMatch(this::dataIdNotExist);
- }
-
- /**
- * Data id not exist boolean.
- *
- * @param pluginDataId the plugin data id
- * @return the boolean
- */
- private boolean dataIdNotExist(final String pluginDataId) {
- return Objects.isNull(apolloClient.getItemValue(pluginDataId));
- }
-}
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloDataChangedListener.java b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloDataChangedListener.java
deleted file mode 100644
index eab59e12e28f..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/java/org/apache/shenyu/admin/listener/apollo/ApolloDataChangedListener.java
+++ /dev/null
@@ -1,63 +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.admin.listener.apollo;
-
-import org.apache.shenyu.admin.listener.AbstractNodeDataChangedListener;
-import org.apache.shenyu.common.constant.ApolloPathConstants;
-
-/**
- * use apollo to push data changes.
- *
- * @since 2.6.0
- */
-public class ApolloDataChangedListener extends AbstractNodeDataChangedListener {
- private final ApolloClient apolloClient;
-
- /**
- * Instantiates a new apollo data changed listener.
- *
- * @param apolloClient the apollo client
- */
- public ApolloDataChangedListener(final ApolloClient apolloClient) {
- super(new ChangeData(ApolloPathConstants.PLUGIN_DATA_ID,
- ApolloPathConstants.SELECTOR_DATA_ID,
- ApolloPathConstants.RULE_DATA_ID,
- ApolloPathConstants.AUTH_DATA_ID,
- ApolloPathConstants.META_DATA_ID,
- ApolloPathConstants.PROXY_SELECTOR_DATA_ID,
- ApolloPathConstants.DISCOVERY_DATA_ID));
- this.apolloClient = apolloClient;
- }
-
- @Override
- public void doPublishConfig(final String dataId, final Object data) {
- this.apolloClient.createOrUpdateItem(dataId, data, "create config data");
- this.apolloClient.publishNamespace("publish config data", "");
- }
-
- @Override
- public String getConfig(final String dataId) {
- return this.apolloClient.getItemValue(dataId);
- }
-
- @Override
- public void doDelConfig(final String dataId) {
- this.apolloClient.removeItemKey(dataId);
- this.apolloClient.publishNamespace("delete config data", "");
- }
-}
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring.factories b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index f210012816e8..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring.factories
+++ /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.
-#
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.shenyu.admin.config.ApolloSyncConfiguration
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring.provides b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring.provides
deleted file mode 100644
index 9893ff1dba24..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring.provides
+++ /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.
-#
-
-provides: shenyu-admin-listener-apollo
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
deleted file mode 100644
index cda1dd637890..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ /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.
-#
-
-org.apache.shenyu.admin.config.ApolloSyncConfiguration
diff --git a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/test/java/org/apache/shenyu/admin/listener/apollo/ApolloClientTest.java b/shenyu-admin-listener/shenyu-admin-listener-apollo/src/test/java/org/apache/shenyu/admin/listener/apollo/ApolloClientTest.java
deleted file mode 100644
index 10385d90fe64..000000000000
--- a/shenyu-admin-listener/shenyu-admin-listener-apollo/src/test/java/org/apache/shenyu/admin/listener/apollo/ApolloClientTest.java
+++ /dev/null
@@ -1,94 +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.admin.listener.apollo;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import org.apache.shenyu.admin.config.properties.ApolloProperties;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mockito;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-@ContextConfiguration(classes = {ApolloProperties.class})
-@RunWith(SpringJUnit4ClassRunner.class)
-public class ApolloClientTest {
-
- @MockBean
- private ApolloClient apolloClient;
-
- /**
- * Method under test: {@link ApolloClient#ApolloClient(ApolloProperties)}.
- */
- @Test
- public void testConstructor() {
- ApolloProperties apolloConfig = new ApolloProperties();
- apolloConfig.setAppId("42");
- apolloConfig.setClusterName("Cluster Name");
- apolloConfig.setEnv("Env");
- apolloConfig.setMeta("Meta");
- apolloConfig.setNamespace("Namespace");
- apolloConfig.setPortalUrl("http://localhost:8080");
- apolloConfig.setToken("ABC123");
- new ApolloClient(apolloConfig);
- assertEquals("42", apolloConfig.getAppId());
- assertEquals("ABC123", apolloConfig.getToken());
- assertEquals("http://localhost:8080", apolloConfig.getPortalUrl());
- assertEquals("Namespace", apolloConfig.getNamespace());
- assertEquals("Meta", apolloConfig.getMeta());
- assertEquals("Env", apolloConfig.getEnv());
- assertEquals("Cluster Name", apolloConfig.getClusterName());
- }
-
- /**
- * Method under test: {@link ApolloClient#getItemValue(String)}.
- */
- @Test
- public void testGetItemValue() {
- when(apolloClient.getItemValue(Mockito.any())).thenReturn("42");
- assertEquals("42", apolloClient.getItemValue("Key"));
- verify(apolloClient).getItemValue(Mockito.any());
- }
-
- /**
- * Method under test: {@link ApolloClient#createOrUpdateItem(String, Object, String)}.
- */
- @Test
- public void testCreateOrUpdateItem() {
- doNothing().when(apolloClient)
- .createOrUpdateItem(Mockito.any(), Mockito.
diff --git a/shenyu-registry/shenyu-registry-apollo/pom.xml b/shenyu-registry/shenyu-registry-apollo/pom.xml
deleted file mode 100644
index 1359ef8f3028..000000000000
--- a/shenyu-registry/shenyu-registry-apollo/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
- org.apache.shenyu
- shenyu-registry
- 2.7.3-SNAPSHOT
-
- 4.0.0
- shenyu-registry-apollo
-
-
-
- com.google.guava
- guava
-
-
-
- org.apache.shenyu
- shenyu-registry-api
- ${project.version}
-
-
-
- com.ctrip.framework.apollo
- apollo-client
-
-
-
- com.ctrip.framework.apollo
- apollo-openapi
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- ${maven-shade-plugin.version}
-
-
-
-
- package
-
- shade
-
-
-
-
-
-
-
diff --git a/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloClient.java b/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloClient.java
deleted file mode 100644
index 23b6915fb890..000000000000
--- a/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloClient.java
+++ /dev/null
@@ -1,134 +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.registry.apollo;
-
-import com.ctrip.framework.apollo.openapi.client.ApolloOpenApiClient;
-import com.ctrip.framework.apollo.openapi.dto.NamespaceReleaseDTO;
-import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
-import org.apache.shenyu.common.utils.GsonUtils;
-
-import java.util.Date;
-
-/**
- * apollo open-api client.
- */
-public class ApolloClient {
-
- private static final String DEFAULT_USER = "apollo";
-
- private final ApolloConfig apolloConfig;
-
- private final ApolloOpenApiClient apolloOpenApiClient;
-
- public ApolloClient(final ApolloConfig apolloConfig) {
- this.apolloConfig = apolloConfig;
-
- this.apolloOpenApiClient = ApolloOpenApiClient
- .newBuilder()
- .withPortalUrl(apolloConfig.getPortalUrl())
- .withToken(apolloConfig.getToken())
- .build();
- }
-
- /**
- * get item value.
- * @param key item key
- * @return item value
- */
- public String getItemValue(final String key) {
- OpenItemDTO openItemDTO = this.apolloOpenApiClient.getItem(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- key
- );
- return openItemDTO.getValue();
- }
-
- /**
- * create or update item into namespace.
- * @param key item key
- * @param value item value
- * @param comment item comment
- */
- public void createOrUpdateItem(final String key, final Object value, final String comment) {
- this.createOrUpdateItem(key, GsonUtils.getInstance().toJson(value), comment);
- }
-
- /**
- * create or update item into namespace.
- * @param key item key
- * @param value item value
- * @param comment item comment
- */
- public void createOrUpdateItem(final String key, final String value, final String comment) {
- OpenItemDTO openItemDTO = new OpenItemDTO();
- openItemDTO.setKey(key);
- openItemDTO.setValue(value);
- openItemDTO.setComment(comment);
- openItemDTO.setDataChangeCreatedBy(DEFAULT_USER);
- openItemDTO.setDataChangeLastModifiedBy(DEFAULT_USER);
- Date now = new Date();
- openItemDTO.setDataChangeCreatedTime(now);
- openItemDTO.setDataChangeLastModifiedTime(now);
-
- this.apolloOpenApiClient.createOrUpdateItem(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- openItemDTO
- );
- }
-
- /**
- * remove item from namespace.
- * @param key item key
- */
- public void removeItem(final String key) {
- this.apolloOpenApiClient.removeItem(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- key,
- DEFAULT_USER
- );
- }
-
- /**
- * publish item list in namespace.
- * @param releaseTitle publish release title
- * @param releaseComment publish release comment
- */
- public void publishNamespace(final String releaseTitle, final String releaseComment) {
- NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO();
- namespaceReleaseDTO.setReleaseTitle(releaseTitle);
- namespaceReleaseDTO.setReleaseComment(releaseComment);
- namespaceReleaseDTO.setReleasedBy(DEFAULT_USER);
-
- this.apolloOpenApiClient.publishNamespace(
- apolloConfig.getAppId(),
- apolloConfig.getEnv(),
- apolloConfig.getClusterName(),
- apolloConfig.getNamespace(),
- namespaceReleaseDTO
- );
- }
-}
diff --git a/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloConfig.java b/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloConfig.java
deleted file mode 100644
index 6eb3c10cd1f1..000000000000
--- a/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloConfig.java
+++ /dev/null
@@ -1,150 +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.registry.apollo;
-
-public class ApolloConfig {
-
- /**
- * appId.
- */
- private String appId;
-
- /**
- * portal url.
- * e.g. localhost:8080
- */
- private String portalUrl;
-
- /**
- * env.
- * e.g. ENV
- */
- private String env;
-
- /**
- * cluster name.
- */
- private String clusterName;
-
- /**
- * namespace name.
- */
- private String namespace;
-
- /**
- * open api use token.
- */
- private String token;
-
- /**
- * get appId.
- * @return appId
- */
- public String getAppId() {
- return appId;
- }
-
- /**
- * set app id.
- * @param appId app id
- */
- public void setAppId(final String appId) {
- this.appId = appId;
- }
-
- /**
- * get portal url.
- * @return portal url
- */
- public String getPortalUrl() {
- return portalUrl;
- }
-
- /**
- * set portal url.
- * @param portalUrl portal url
- */
- public void setPortalUrl(final String portalUrl) {
- this.portalUrl = portalUrl;
- }
-
- /**
- * get env.
- * @return env
- */
- public String getEnv() {
- return env;
- }
-
- /**
- * set env.
- * @param env env
- */
- public void setEnv(final String env) {
- this.env = env;
- }
-
- /**
- * get cluster name.
- * @return cluster name
- */
- public String getClusterName() {
- return clusterName;
- }
-
- /**
- * set cluster name.
- * @param clusterName cluster name
- */
- public void setClusterName(final String clusterName) {
- this.clusterName = clusterName;
- }
-
- /**
- * get namespace name.
- * @return namespace name
- */
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * set namespace name.
- * @param namespace namespace name
- */
- public void setNamespace(final String namespace) {
- this.namespace = namespace;
- }
-
- /**
- * get token.
- * @return token
- */
- public String getToken() {
- return token;
- }
-
- /**
- * set token.
- * @param token token
- */
- public void setToken(final String token) {
- this.token = token;
- }
-}
-
diff --git a/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloInstanceRegisterRepository.java b/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloInstanceRegisterRepository.java
deleted file mode 100644
index 94e8c22444c2..000000000000
--- a/shenyu-registry/shenyu-registry-apollo/src/main/java/org/apache/shenyu/registry/apollo/ApolloInstanceRegisterRepository.java
+++ /dev/null
@@ -1,186 +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.registry.apollo;
-
-import com.ctrip.framework.apollo.Config;
-import com.ctrip.framework.apollo.ConfigChangeListener;
-import com.ctrip.framework.apollo.ConfigService;
-import com.ctrip.framework.apollo.core.ConfigConsts;
-import com.google.common.collect.Maps;
-import org.apache.shenyu.common.constant.Constants;
-import org.apache.shenyu.common.utils.GsonUtils;
-import org.apache.shenyu.registry.api.ShenyuInstanceRegisterRepository;
-import org.apache.shenyu.registry.api.config.RegisterConfig;
-import org.apache.shenyu.registry.api.entity.InstanceEntity;
-import org.apache.shenyu.registry.api.path.InstancePathConstants;
-import org.apache.shenyu.spi.Join;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * The type apollo instance register repository.
- */
-@Join(isSingleton = false)
-public class ApolloInstanceRegisterRepository implements ShenyuInstanceRegisterRepository {
-
- private static final String APOLLO_CLUSTER = "apollo.cluster";
-
- private static final String PROP_APP_ID = "app.id";
-
- private static final String PROP_APOLLO_META = "apollo.meta";
-
- private static final String APOLLO_NAMESPACE = "apollo.bootstrap.namespace";
-
- private static final Logger LOGGER = LoggerFactory.getLogger(ApolloInstanceRegisterRepository.class);
-
- private ApolloClient apolloClient;
-
- private final Map configChangeListenerMap = Maps.newConcurrentMap();
-
- private final Map> watcherInstanceRegisterMap = new ConcurrentHashMap<>();
-
- private String namespace;
-
- private Config configService;
-
- @Override
- public void init(final RegisterConfig config) {
- Properties properties = config.getProps();
- String meta = config.getServerLists();
- String appId = properties.getProperty("appId", "shenyu");
- String clusterName = properties.getProperty("clusterName", ConfigConsts.CLUSTER_NAME_DEFAULT);
- String namespace = properties.getProperty("namespace", ConfigConsts.NAMESPACE_APPLICATION);
- Optional.ofNullable(appId).ifPresent(x -> System.setProperty(PROP_APP_ID, x));
- Optional.ofNullable(meta).ifPresent(x -> System.setProperty(PROP_APOLLO_META, x));
- Optional.ofNullable(clusterName).ifPresent(x -> System.setProperty(APOLLO_CLUSTER, x));
- Optional.ofNullable(namespace).ifPresent(x -> System.setProperty(APOLLO_NAMESPACE, x));
- Optional.ofNullable(namespace).ifPresent(x -> System.setProperty(APOLLO_NAMESPACE, x));
- this.namespace = namespace;
- this.configService = ConfigService.getAppConfig();
- buildClient(config);
- }
-
- private void buildClient(final RegisterConfig config) {
- // init apollo client
- Properties properties = config.getProps();
- String appId = properties.getProperty("appId");
- String token = properties.getProperty("token");
- String env = properties.getProperty("env", "DEV");
- String clusterName = properties.getProperty("clusterName", ConfigConsts.CLUSTER_NAME_DEFAULT);
- String namespace = properties.getProperty("namespace", ConfigConsts.NAMESPACE_APPLICATION);
- String portalUrl = properties.getProperty("portalUrl", "http://localhost:8070");
- ApolloConfig apolloConfig = new ApolloConfig();
- apolloConfig.setAppId(appId);
- apolloConfig.setPortalUrl(portalUrl);
- apolloConfig.setToken(token);
- apolloConfig.setEnv(env);
- apolloConfig.setClusterName(clusterName);
- apolloConfig.setNamespace(namespace);
- this.apolloClient = new ApolloClient(apolloConfig);
- }
-
- @Override
- public void persistInstance(final InstanceEntity instance) {
- String instanceNodeName = buildInstanceNodeName(instance);
- String instancePath = InstancePathConstants.buildInstanceParentPath(instance.getAppName());
- String realNode = InstancePathConstants.buildRealNode(instancePath, instanceNodeName);
- String nodeData = GsonUtils.getInstance().toJson(instance);
- apolloClient.createOrUpdateItem(realNode, nodeData, "register instance");
- apolloClient.publishNamespace(namespace, "publish instance");
- LOGGER.info("apollo instance register success: {}", nodeData);
- }
-
- @Override
- public List selectInstances(final String selectKey) {
- final String watchKey = InstancePathConstants.buildInstanceParentPath(selectKey);
-
- final Function