You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/12/06 05:35:10 UTC
[shardingsphere] branch master updated: Remove the cluster examples and use the automatically generated examples (#22670)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new b094cea5591 Remove the cluster examples and use the automatically generated examples (#22670)
b094cea5591 is described below
commit b094cea55913b1f3eaf8951ddad6825a9ef6cffe
Author: Guocheng Tang <to...@apache.org>
AuthorDate: Tue Dec 6 13:35:03 2022 +0800
Remove the cluster examples and use the automatically generated examples (#22670)
---
.../cluster-mode-raw-jdbc-example/pom.xml | 59 -----------
.../ClusterModeRawJavaConfigurationExample.java | 104 ------------------
.../ClusterModeRawYamlConfigurationExample.java | 92 ----------------
.../jdbc/config/ClusterModeConfigurationUtil.java | 70 -------------
.../config/cloud/CloudEncryptConfiguration.java | 39 -------
.../CloudReadwriteSplittingConfiguration.java | 39 -------
.../config/cloud/CloudShadowConfiguration.java | 39 -------
...oudShardingDatabasesAndTablesConfiguration.java | 39 -------
.../config/local/LocalEncryptConfiguration.java | 61 -----------
.../LocalReadwriteSplittingConfiguration.java | 60 -----------
.../config/local/LocalShadowConfiguration.java | 56 ----------
...calShardingDatabasesAndTablesConfiguration.java | 87 ----------------
.../local/LocalShardingDatabasesConfiguration.java | 85 ---------------
...calShardingReadwriteSplittingConfiguration.java | 116 ---------------------
.../local/LocalShardingTablesConfiguration.java | 82 ---------------
.../mode/raw/jdbc/config/type/RepositoryType.java | 30 ------
.../META-INF/zookeeper/cloud/encrypt.yaml | 24 -----
.../zookeeper/cloud/readwrite-splitting.yaml | 24 -----
.../resources/META-INF/zookeeper/cloud/shadow.yaml | 24 -----
.../zookeeper/cloud/sharding-databases-tables.yaml | 26 -----
.../META-INF/zookeeper/local/encrypt.yaml | 49 ---------
.../zookeeper/local/readwrite-splitting.yaml | 57 ----------
.../resources/META-INF/zookeeper/local/shadow.yaml | 82 ---------------
.../zookeeper/local/sharding-databases-tables.yaml | 91 ----------------
.../src/main/resources/logback.xml | 34 ------
.../pom.xml | 50 ---------
.../ClusterModeSpringBootMybatisExample.java | 41 --------
.../src/main/resources/META-INF/mybatis-config.xml | 30 ------
.../application-cloud-zookeeper-encrypt.properties | 19 ----
...-cloud-zookeeper-readwrite-splitting.properties | 19 ----
.../application-cloud-zookeeper-shadow.properties | 19 ----
...-zookeeper-sharding-databases-tables.properties | 19 ----
.../application-local-zookeeper-encrypt.properties | 19 ----
...-local-zookeeper-readwrite-splitting.properties | 19 ----
.../application-local-zookeeper-shadow.properties | 19 ----
...-zookeeper-sharding-databases-tables.properties | 19 ----
.../src/main/resources/application.properties | 30 ------
.../main/resources/cloud-zookeeper-encrypt.yaml | 24 -----
.../cloud-zookeeper-readwrite-splitting.yaml | 24 -----
.../src/main/resources/cloud-zookeeper-shadow.yaml | 24 -----
.../cloud-zookeeper-sharding-databases-tables.yaml | 24 -----
.../main/resources/local-zookeeper-encrypt.yaml | 50 ---------
.../local-zookeeper-readwrite-splitting.yaml | 58 -----------
.../src/main/resources/local-zookeeper-shadow.yaml | 81 --------------
.../local-zookeeper-sharding-databases-tables.yaml | 87 ----------------
.../src/main/resources/logback.xml | 34 ------
.../pom.xml | 51 ---------
.../ClusterModeSpringNamespaceMybatisExample.java | 62 -----------
.../zookeeper/cloud/application-encrypt.xml | 51 ---------
.../cloud/application-readwrite-splitting.xml | 51 ---------
.../zookeeper/cloud/application-shadow.xml | 51 ---------
.../application-sharding-databases-tables.xml | 51 ---------
.../zookeeper/local/application-encrypt.xml | 51 ---------
.../local/application-readwrite-splitting.xml | 51 ---------
.../zookeeper/local/application-shadow.xml | 51 ---------
.../application-sharding-databases-tables.xml | 51 ---------
.../META-INF/zookeeper/registry-center.xml | 31 ------
.../main/resources/cloud-zookeeper-encrypt.yaml | 24 -----
.../cloud-zookeeper-readwrite-splitting.yaml | 24 -----
.../src/main/resources/cloud-zookeeper-shadow.yaml | 24 -----
.../cloud-zookeeper-sharding-databases-tables.yaml | 24 -----
.../main/resources/local-zookeeper-encrypt.yaml | 60 -----------
.../local-zookeeper-readwrite-splitting.yaml | 61 -----------
.../src/main/resources/local-zookeeper-shadow.yaml | 81 --------------
.../local-zookeeper-sharding-databases-tables.yaml | 89 ----------------
.../src/main/resources/logback.xml | 34 ------
.../cluster-mode-example/pom.xml | 37 -------
.../single-feature-example/pom.xml | 1 -
68 files changed, 3189 deletions(-)
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/pom.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/pom.xml
deleted file mode 100644
index cabce3f4cac..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/pom.xml
+++ /dev/null
@@ -1,59 +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.shardingsphere.example</groupId>
- <artifactId>cluster-mode-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>cluster-mode-raw-jdbc-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-raw-jdbc</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>config-utility</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-cluster-mode-repository-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-cluster-mode-repository-etcd</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-cluster-mode-repository-nacos</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/ClusterModeRawJavaConfigurationExample.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/ClusterModeRawJavaConfigurationExample.java
deleted file mode 100644
index 82329a986f8..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/ClusterModeRawJavaConfigurationExample.java
+++ /dev/null
@@ -1,104 +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.shardingsphere.example.cluster.mode.raw.jdbc;
-
-import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.ClusterModeConfigurationUtil;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud.CloudEncryptConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud.CloudReadwriteSplittingConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud.CloudShadowConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud.CloudShardingDatabasesAndTablesConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.local.LocalEncryptConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.local.LocalReadwriteSplittingConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.local.LocalShadowConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.local.LocalShardingDatabasesAndTablesConfiguration;
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.type.RepositoryType;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
-import org.apache.shardingsphere.example.type.ShardingType;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-/*
- * 1. Please make sure primary replica data replication sync on MySQL is running correctly. Otherwise this example will query empty data from replica.
- * 2. Please make sure sharding-governance-center-zookeeper in your pom if registryCenterType = RegistryCenterType.ZOOKEEPER.
- */
-public final class ClusterModeRawJavaConfigurationExample {
-
- private static ShardingType shardingType = ShardingType.SHARDING_DATABASES_AND_TABLES;
-// private static ShardingType shardingType = ShardingType.READWRITE_SPLITTING;
-// private static ShardingType shardingType = ShardingType.ENCRYPT;
-// private static ShardingType shardingType = ShardingType.SHADOW;
-
- private static boolean loadConfigFromRegCenter = false;
-// private static boolean loadConfigFromRegCenter = true;
-
- private static String repositoryType = RepositoryType.ZOOKEEPER;
-// private static String repositoryType = RepositoryType.ETCD;
-// private static String repositoryType = RepositoryType.NACOS;
-
- public static void main(final String[] args) throws Exception {
- DataSource dataSource = getDataSource(shardingType, loadConfigFromRegCenter, repositoryType);
- try {
- ExampleExecuteTemplate.run(getExampleService(dataSource));
- } finally {
- closeDataSource(dataSource);
- }
- }
-
- private static DataSource getDataSource(final ShardingType shardingType, final boolean loadConfigFromRegCenter, final String repositoryType) throws SQLException {
- ModeConfiguration modeConfig = getModeConfiguration(shardingType, repositoryType);
- ExampleConfiguration config;
- switch (shardingType) {
- case SHARDING_DATABASES_AND_TABLES:
- config = loadConfigFromRegCenter
- ? new CloudShardingDatabasesAndTablesConfiguration(modeConfig) : new LocalShardingDatabasesAndTablesConfiguration(modeConfig);
- break;
- case READWRITE_SPLITTING:
- config = loadConfigFromRegCenter ? new CloudReadwriteSplittingConfiguration(modeConfig) : new LocalReadwriteSplittingConfiguration(modeConfig);
- break;
- case ENCRYPT:
- config = loadConfigFromRegCenter ? new CloudEncryptConfiguration(modeConfig) : new LocalEncryptConfiguration(modeConfig);
- break;
- case SHADOW:
- config = loadConfigFromRegCenter ? new CloudShadowConfiguration(modeConfig) : new LocalShadowConfiguration(modeConfig);
- break;
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- return config.getDataSource();
- }
-
- private static ModeConfiguration getModeConfiguration(final ShardingType shardingType, final String repositoryType) {
- return ClusterModeConfigurationUtil.getRepositoryConfiguration(shardingType, repositoryType);
- }
-
- private static ExampleService getExampleService(final DataSource dataSource) {
- return new OrderServiceImpl(dataSource);
- }
-
- private static void closeDataSource(final DataSource dataSource) throws Exception {
- if (dataSource instanceof ShardingSphereDataSource) {
- ((ShardingSphereDataSource) dataSource).close();
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/ClusterModeRawYamlConfigurationExample.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/ClusterModeRawYamlConfigurationExample.java
deleted file mode 100644
index a6603802485..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/ClusterModeRawYamlConfigurationExample.java
+++ /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.
- */
-
-package org.apache.shardingsphere.example.cluster.mode.raw.jdbc;
-
-import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
-import org.apache.shardingsphere.example.type.RegistryCenterType;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.io.IOException;
-import java.sql.SQLException;
-
-/*
- * 1. Please make sure primary replica data replication sync on MySQL is running correctly. Otherwise this example will query empty data from replica.
- * 2. Please make sure sharding-governance-center-zookeeper in your pom if registryCenterType = RegistryCenterType.ZOOKEEPER.
- * 3. Please make sure sharding-governance-center-nacos in your pom if registryCenterType = RegistryCenterType.NACOS.
- */
-public final class ClusterModeRawYamlConfigurationExample {
-
- private static ShardingType shardingType = ShardingType.SHARDING_DATABASES_AND_TABLES;
-// private static ShardingType shardingType = ShardingType.READWRITE_SPLITTING;
-// private static ShardingType shardingType = ShardingType.ENCRYPT;
-// private static ShardingType shardingType = ShardingType.SHADOW;
-
- private static boolean loadConfigFromRegCenter = false;
-// private static boolean loadConfigFromRegCenter = true;
-
- private static RegistryCenterType registryCenterType = RegistryCenterType.ZOOKEEPER;
-
- public static void main(final String[] args) throws Exception {
- DataSource dataSource = getDataSource(registryCenterType, loadConfigFromRegCenter, shardingType);
- try {
- ExampleExecuteTemplate.run(getExampleService(dataSource));
- } finally {
- closeDataSource(dataSource);
- }
- }
-
- private static DataSource getDataSource(final RegistryCenterType registryCenterType, final boolean loadConfigFromRegCenter, final ShardingType shardingType) throws SQLException, IOException {
- String yamlFilePath;
- switch (shardingType) {
- case SHARDING_DATABASES_AND_TABLES:
- yamlFilePath = String.format("/META-INF/%s/%s/sharding-databases-tables.yaml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- return YamlShardingSphereDataSourceFactory.createDataSource(getFile(yamlFilePath));
- case READWRITE_SPLITTING:
- yamlFilePath = String.format("/META-INF/%s/%s/readwrite-splitting.yaml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- return YamlShardingSphereDataSourceFactory.createDataSource(getFile(yamlFilePath));
- case ENCRYPT:
- yamlFilePath = String.format("/META-INF/%s/%s/encrypt.yaml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- return YamlShardingSphereDataSourceFactory.createDataSource(getFile(yamlFilePath));
- case SHADOW:
- yamlFilePath = String.format("/META-INF/%s/%s/shadow.yaml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- return YamlShardingSphereDataSourceFactory.createDataSource(getFile(yamlFilePath));
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- }
-
- private static File getFile(final String fileName) {
- return new File(ClusterModeRawYamlConfigurationExample.class.getResource(fileName).getFile());
- }
-
- private static ExampleService getExampleService(final DataSource dataSource) {
- return new OrderServiceImpl(dataSource);
- }
-
- private static void closeDataSource(final DataSource dataSource) throws Exception {
- if (dataSource instanceof ShardingSphereDataSource) {
- ((ShardingSphereDataSource) dataSource).close();
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/ClusterModeConfigurationUtil.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/ClusterModeConfigurationUtil.java
deleted file mode 100644
index 9eac6b6c76d..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/ClusterModeConfigurationUtil.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.shardingsphere.example.cluster.mode.raw.jdbc.config;
-
-import org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.type.RepositoryType;
-import org.apache.shardingsphere.example.type.ShardingType;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.props.NacosPropertyKey;
-
-import java.util.Properties;
-
-public final class ClusterModeConfigurationUtil {
-
- private static final String NACOS_CONNECTION_STRING = "localhost:8848";
-
- private static final String ZOOKEEPER_CONNECTION_STRING = "localhost:2181";
-
- private static final String ETCD_CONNECTION_STRING = "http://localhost:2379";
-
- public static ModeConfiguration getRepositoryConfiguration(final ShardingType shardingType, final String repositoryType) {
- Properties props = new Properties();
- String repositoryConnection;
- switch (repositoryType) {
- case RepositoryType.NACOS:
- repositoryConnection = NACOS_CONNECTION_STRING;
- break;
- case RepositoryType.ZOOKEEPER:
- repositoryConnection = ZOOKEEPER_CONNECTION_STRING;
- break;
- case RepositoryType.ETCD:
- repositoryConnection = ETCD_CONNECTION_STRING;
- break;
- default:
- throw new UnsupportedOperationException(repositoryType);
- }
- ClusterPersistRepositoryConfiguration clusterRepositoryConfig;
- switch (shardingType) {
- case SHARDING_DATABASES_AND_TABLES:
- clusterRepositoryConfig = new ClusterPersistRepositoryConfiguration(repositoryType, "governance-sharding-data-source", repositoryConnection, props);
- return new ModeConfiguration("Cluster", clusterRepositoryConfig);
- case READWRITE_SPLITTING:
- clusterRepositoryConfig = new ClusterPersistRepositoryConfiguration(repositoryType, "governance-readwrite-splitting-data-source", repositoryConnection, props);
- return new ModeConfiguration("Cluster", clusterRepositoryConfig);
- case ENCRYPT:
- clusterRepositoryConfig = new ClusterPersistRepositoryConfiguration(repositoryType, "governance-encrypt-data-source", repositoryConnection, props);
- return new ModeConfiguration("Cluster", clusterRepositoryConfig);
- case SHADOW:
- clusterRepositoryConfig = new ClusterPersistRepositoryConfiguration(repositoryType, "governance-shadow-data-source", repositoryConnection, props);
- return new ModeConfiguration("Cluster", clusterRepositoryConfig);
- default:
- throw new UnsupportedOperationException(shardingType.toString());
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudEncryptConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudEncryptConfiguration.java
deleted file mode 100644
index 7780448d6d8..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudEncryptConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public class CloudEncryptConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public CloudEncryptConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig);
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudReadwriteSplittingConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudReadwriteSplittingConfiguration.java
deleted file mode 100644
index e4a3c95c3d6..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudReadwriteSplittingConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public final class CloudReadwriteSplittingConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public CloudReadwriteSplittingConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig);
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudShadowConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudShadowConfiguration.java
deleted file mode 100644
index 9a5def10df6..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudShadowConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public final class CloudShadowConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public CloudShadowConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig);
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfigura [...]
deleted file mode 100644
index bb6cb5dd804..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.cloud;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public final class CloudShardingDatabasesAndTablesConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public CloudShardingDatabasesAndTablesConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig);
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalEncryptConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalEncryptConfiguration.java
deleted file mode 100644
index 220f85ae415..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalEncryptConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
-import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
-import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.Properties;
-
-public final class LocalEncryptConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalEncryptConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, DataSourceUtil.createDataSource("demo_ds"), Collections.singleton(getEncryptRuleConfiguration()), new Properties());
- }
-
- private EncryptRuleConfiguration getEncryptRuleConfiguration() {
- return new EncryptRuleConfiguration(Collections.singleton(createEncryptTableRuleConfiguration()), Collections.singletonMap("status_encryptor", createEncryptAlgorithmConfiguration()));
- }
-
- private EncryptTableRuleConfiguration createEncryptTableRuleConfiguration() {
- EncryptColumnRuleConfiguration encryptColumnRuleConfig = new EncryptColumnRuleConfiguration("status", "status", "", "", "", "status_encryptor", null);
- return new EncryptTableRuleConfiguration("t_order", Collections.singleton(encryptColumnRuleConfig), null);
- }
-
- private AlgorithmConfiguration createEncryptAlgorithmConfiguration() {
- Properties props = new Properties();
- props.setProperty("aes-key-value", "123456");
- return new AlgorithmConfiguration("AES", props);
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalReadwriteSplittingConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalReadwriteSplittingConfiguration.java
deleted file mode 100644
index ac4afe8456e..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalReadwriteSplittingConfiguration.java
+++ /dev/null
@@ -1,60 +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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.readwritesplitting.api.ReadwriteSplittingRuleConfiguration;
-import org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceRuleConfiguration;
-import org.apache.shardingsphere.readwritesplitting.api.strategy.StaticReadwriteSplittingStrategyConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Arrays;
-import java.util.Properties;
-
-public final class LocalReadwriteSplittingConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalReadwriteSplittingConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfig = new ReadwriteSplittingDataSourceRuleConfiguration(
- "demo_readwrite_splitting_ds", new StaticReadwriteSplittingStrategyConfiguration("demo_write_ds",
- Arrays.asList("demo_read_ds_0", "demo_read_ds_1")), null, null);
- ReadwriteSplittingRuleConfiguration ruleConfig = new ReadwriteSplittingRuleConfiguration(Collections.singleton(dataSourceConfig), Collections.emptyMap());
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, createDataSourceMap(), Collections.singleton(ruleConfig), new Properties());
- }
-
- private Map<String, DataSource> createDataSourceMap() {
- Map<String, DataSource> result = new HashMap<>(3, 1);
- result.put("demo_write_ds", DataSourceUtil.createDataSource("demo_write_ds"));
- result.put("demo_read_ds_0", DataSourceUtil.createDataSource("demo_read_ds_0"));
- result.put("demo_read_ds_1", DataSourceUtil.createDataSource("demo_read_ds_1"));
- return result;
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShadowConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShadowConfiguration.java
deleted file mode 100644
index 5d802cf046b..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShadowConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class LocalShadowConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalShadowConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, createDataSourceMap(), Collections.singleton(getShadowRuleConfiguration()), new Properties());
- }
-
- private Map<String, DataSource> createDataSourceMap() {
- Map<String, DataSource> result = new HashMap<>(2, 1);
- result.put("ds", DataSourceUtil.createDataSource("demo_ds"));
- result.put("shadow_ds", DataSourceUtil.createDataSource("shadow_demo_ds"));
- return result;
- }
-
- private ShadowRuleConfiguration getShadowRuleConfiguration() {
- return new ShadowRuleConfiguration();
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfigura [...]
deleted file mode 100644
index 557992b6823..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfiguration.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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableReferenceRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class LocalShardingDatabasesAndTablesConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalShardingDatabasesAndTablesConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- private static KeyGenerateStrategyConfiguration getKeyGeneratorConfiguration() {
- return new KeyGenerateStrategyConfiguration("order_id", "snowflake");
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, createDataSourceMap(), Collections.singleton(createShardingRuleConfiguration()), new Properties());
- }
-
- private ShardingRuleConfiguration createShardingRuleConfiguration() {
- ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- result.getTables().add(getOrderTableRuleConfiguration());
- result.getTables().add(getOrderItemTableRuleConfiguration());
- result.getBindingTableGroups().add(new ShardingTableReferenceRuleConfiguration("foo", "t_order, t_order_item"));
- result.getBroadcastTables().add("t_address");
- result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "inline"));
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
- Properties props = new Properties();
- props.setProperty("algorithm-expression", "demo_ds_${user_id % 2}");
- result.getShardingAlgorithms() .put("inline", new AlgorithmConfiguration("INLINE", props));
- result.getShardingAlgorithms() .put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
- result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order", "demo_ds_${0..1}.t_order_${[0, 1]}");
- result.setKeyGenerateStrategy(getKeyGeneratorConfiguration());
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderItemTableRuleConfiguration() {
- return new ShardingTableRuleConfiguration("t_order_item", "demo_ds_${0..1}.t_order_item_${[0, 1]}");
- }
-
- private Map<String, DataSource> createDataSourceMap() {
- Map<String, DataSource> result = new HashMap<>();
- result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0"));
- result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1"));
- return result;
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java
deleted file mode 100644
index 0b5814ef310..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java
+++ /dev/null
@@ -1,85 +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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableReferenceRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class LocalShardingDatabasesConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalShardingDatabasesConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- private static KeyGenerateStrategyConfiguration getKeyGeneratorConfiguration() {
- return new KeyGenerateStrategyConfiguration("order_id", "snowflake");
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, createDataSourceMap(), Collections.singleton(createShardingRuleConfiguration()), new Properties());
- }
-
- private ShardingRuleConfiguration createShardingRuleConfiguration() {
- ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- result.getTables().add(getOrderTableRuleConfiguration());
- result.getTables().add(getOrderItemTableRuleConfiguration());
- result.getBindingTableGroups().add(new ShardingTableReferenceRuleConfiguration("foo", "t_order, t_order_item"));
- result.getBroadcastTables().add("t_address");
- result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "inline"));
- Properties props = new Properties();
- props.setProperty("algorithm-expression", "demo_ds_${user_id % 2}");
- result.getShardingAlgorithms() .put("inline", new AlgorithmConfiguration("INLINE", props));
- result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order");
- result.setKeyGenerateStrategy(getKeyGeneratorConfiguration());
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderItemTableRuleConfiguration() {
- return new ShardingTableRuleConfiguration("t_order_item");
- }
-
- private Map<String, DataSource> createDataSourceMap() {
- Map<String, DataSource> result = new HashMap<>();
- result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0"));
- result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1"));
- return result;
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingReadwriteSplittingConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingReadwriteSplittingConfigura [...]
deleted file mode 100644
index d9191650524..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingReadwriteSplittingConfiguration.java
+++ /dev/null
@@ -1,116 +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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
-import org.apache.shardingsphere.readwritesplitting.api.ReadwriteSplittingRuleConfiguration;
-import org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceRuleConfiguration;
-import org.apache.shardingsphere.readwritesplitting.api.strategy.StaticReadwriteSplittingStrategyConfiguration;
-import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableReferenceRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Properties;
-
-public final class LocalShardingReadwriteSplittingConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalShardingReadwriteSplittingConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- Collection<RuleConfiguration> configs = new LinkedList<>();
- configs.add(getShardingRuleConfiguration());
- configs.add(getReadwriteSplittingRuleConfiguration());
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, createDataSourceMap(), configs, new Properties());
- }
-
- private ShardingRuleConfiguration getShardingRuleConfiguration() {
- ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- result.getTables().add(getOrderTableRuleConfiguration());
- result.getTables().add(getOrderItemTableRuleConfiguration());
- result.getBindingTableGroups().add(new ShardingTableReferenceRuleConfiguration("foo", "t_order, t_order_item"));
- result.getBroadcastTables().add("t_address");
- result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "standard_test_db"));
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
- result.getShardingAlgorithms() .put("standard_test_db", new AlgorithmConfiguration("STANDARD_TEST_DB", new Properties()));
- result.getShardingAlgorithms() .put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
- result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
- result.setKeyGenerateStrategy(getKeyGeneratorConfiguration());
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderItemTableRuleConfiguration() {
- return new ShardingTableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
- }
-
- private static KeyGenerateStrategyConfiguration getKeyGeneratorConfiguration() {
- return new KeyGenerateStrategyConfiguration("order_id", "snowflake");
- }
-
- private ReadwriteSplittingRuleConfiguration getReadwriteSplittingRuleConfiguration() {
- ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfiguration1 = new ReadwriteSplittingDataSourceRuleConfiguration(
- "ds_0", new StaticReadwriteSplittingStrategyConfiguration("demo_write_ds_0",
- Arrays.asList("demo_write_ds_0_read_0", "demo_write_ds_0_read_1")), null,null);
- ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfiguration2 = new ReadwriteSplittingDataSourceRuleConfiguration(
- "ds_1", new StaticReadwriteSplittingStrategyConfiguration("demo_write_ds_1",
- Arrays.asList("demo_write_ds_1_read_0", "demo_write_ds_1_read_1")), null,null);
- return new ReadwriteSplittingRuleConfiguration(Arrays.asList(dataSourceConfiguration1, dataSourceConfiguration2), Collections.emptyMap());
- }
-
- private Properties getReadWriteProperties(final String writeDataSourceName, final String readDataSourceNames) {
- Properties result = new Properties();
- result.setProperty("write-data-source-name", writeDataSourceName);
- result.setProperty("read-data-source-names", readDataSourceNames);
- return result;
- }
-
- private Map<String, DataSource> createDataSourceMap() {
- Map<String, DataSource> result = new HashMap<>(6, 1);
- result.put("demo_write_ds_0", DataSourceUtil.createDataSource("demo_write_ds_0"));
- result.put("demo_write_ds_0_read_0", DataSourceUtil.createDataSource("demo_write_ds_0_read_0"));
- result.put("demo_write_ds_0_read_1", DataSourceUtil.createDataSource("demo_write_ds_0_read_1"));
- result.put("demo_write_ds_1", DataSourceUtil.createDataSource("demo_write_ds_1"));
- result.put("demo_write_ds_1_read_0", DataSourceUtil.createDataSource("demo_write_ds_1_read_0"));
- result.put("demo_write_ds_1_read_1", DataSourceUtil.createDataSource("demo_write_ds_1_read_1"));
- return result;
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingTablesConfiguration.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingTablesConfiguration.java
deleted file mode 100644
index 48fbf039a89..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/local/LocalShardingTablesConfiguration.java
+++ /dev/null
@@ -1,82 +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.shardingsphere.example.cluster.mode.raw.jdbc.config.local;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
-import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableReferenceRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class LocalShardingTablesConfiguration implements ExampleConfiguration {
-
- private final ModeConfiguration modeConfig;
-
- public LocalShardingTablesConfiguration(final ModeConfiguration modeConfig) {
- this.modeConfig = modeConfig;
- }
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(modeConfig, createDataSourceMap(), Collections.singleton(createShardingRuleConfiguration()), new Properties());
- }
-
- private ShardingRuleConfiguration createShardingRuleConfiguration() {
- ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- result.getTables().add(getOrderTableRuleConfiguration());
- result.getTables().add(getOrderItemTableRuleConfiguration());
- result.getBindingTableGroups().add(new ShardingTableReferenceRuleConfiguration("foo", "t_order, t_order_item"));
- result.getBroadcastTables().add("t_address");
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
- result.getShardingAlgorithms().put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
- result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order", "demo_ds.t_order_${[0, 1]}");
- result.setKeyGenerateStrategy(getKeyGeneratorConfiguration());
- return result;
- }
-
- private ShardingTableRuleConfiguration getOrderItemTableRuleConfiguration() {
- return new ShardingTableRuleConfiguration("t_order_item", "demo_ds.t_order_item_${[0, 1]}");
- }
-
- private Map<String, DataSource> createDataSourceMap() {
- Map<String, DataSource> result = new HashMap<>();
- result.put("demo_ds", DataSourceUtil.createDataSource("demo_ds"));
- return result;
- }
-
- private static KeyGenerateStrategyConfiguration getKeyGeneratorConfiguration() {
- return new KeyGenerateStrategyConfiguration("order_id", "snowflake");
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/type/RepositoryType.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/type/RepositoryType.java
deleted file mode 100644
index e5fb636943d..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/raw/jdbc/config/type/RepositoryType.java
+++ /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.
- */
-
-package org.apache.shardingsphere.example.cluster.mode.raw.jdbc.config.type;
-
-/**
- * Repository type.
- */
-public final class RepositoryType {
-
- public static final String NACOS = "Nacos";
-
- public static final String ZOOKEEPER = "ZooKeeper";
-
- public static final String ETCD = "etcd";
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/encrypt.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/encrypt.yaml
deleted file mode 100644
index cac131df3cb..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/encrypt.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_ds_encrypt
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/readwrite-splitting.yaml
deleted file mode 100644
index 290ff73554a..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/readwrite-splitting.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_readwrite_ds
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/shadow.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/shadow.yaml
deleted file mode 100644
index f45e4b94475..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/shadow.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_ds_shadow
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/sharding-databases-tables.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/sharding-databases-tables.yaml
deleted file mode 100644
index 54e20b701ad..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/cloud/sharding-databases-tables.yaml
+++ /dev/null
@@ -1,26 +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.
-#
-
-databaseName: sharding-databases-tables
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_ds_sharding
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/encrypt.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/encrypt.yaml
deleted file mode 100644
index 19675a7f99b..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/encrypt.yaml
+++ /dev/null
@@ -1,49 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_ds_encrypt
- server-lists: localhost:2181
-
-dataSources:
- uinque_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !ENCRYPT
- tables:
- t_order:
- columns:
- status:
- cipherColumn: status
- encryptorName: status-encryptor
- encryptors:
- status-encryptor:
- type: AES
- props:
- aes-key-value: 123456abc
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml
deleted file mode 100644
index d0c3644db8c..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml
+++ /dev/null
@@ -1,57 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_readwrite_ds
- server-lists: localhost:2181
-
-dataSources:
- write_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds:
- staticStrategy:
- writeDataSourceName: write_ds
- readDataSourceNames:
- - read_ds_0
- - read_ds_1
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/shadow.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/shadow.yaml
deleted file mode 100644
index f202e5174ae..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/shadow.yaml
+++ /dev/null
@@ -1,82 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_ds_shadow
- server-lists: localhost:2181
-
-dataSources:
- ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- shadow-ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/shadow_demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
- - !SHADOW
- dataSources:
- shadowDataSource:
- sourceDataSourceName: ds
- shadowDataSourceName: shadow-ds
- tables:
- t_user:
- dataSourceNames:
- - shadowDataSource
- shadowAlgorithmNames:
- - user-id-insert-match-algorithm
- - user-id-select-match-algorithm
- - user-id-update-match-algorithm
- - user-id-delete-match-algorithm
- - simple-hint-algorithm
- shadowAlgorithms:
- user-id-insert-match-algorithm:
- type: VALUE_MATCH
- props:
- operation: insert
- column: user_type
- value: 1
- user-id-select-match-algorithm:
- type: VALUE_MATCH
- props:
- operation: select
- column: user_type
- value: 1
- user-id-delete-match-algorithm:
- type: VALUE_MATCH
- props:
- operation: delete
- column: user_type
- value: 1
- simple-hint-algorithm:
- type: SIMPLE_HINT
- props:
- shadow: true
- foo: bar
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/sharding-databases-tables.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/sharding-databases-tables.yaml
deleted file mode 100644
index a7c615779d9..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/sharding-databases-tables.yaml
+++ /dev/null
@@ -1,91 +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.
-#
-
-databaseName: sharding-databases-tables
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_yaml_ds_sharding
- server-lists: localhost:2181
-
-dataSources:
- ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !SHARDING
- tables:
- t_order:
- actualDataNodes: ds_${0..1}.t_order_${0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t-order-inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- t_order_item:
- actualDataNodes: ds_${0..1}.t_order_item_${0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t-order-item-inline
- bindingTables:
- - t_order,t_order_item
- broadcastTables:
- - t_address
-
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: database-inline
- defaultTableStrategy:
- none:
-
- shardingAlgorithms:
- database-inline:
- type: INLINE
- props:
- algorithm-expression: ds_${user_id % 2}
- t-order-inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t-order-item-inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/logback.xml
deleted file mode 100644
index c3a1e6c788c..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-raw-jdbc-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,34 +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.
- -->
-
-<configuration>
- <property name="log.context.name" value="cluster-mode-raw-jdbc-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/pom.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/pom.xml
deleted file mode 100644
index 15d0d430ade..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/pom.xml
+++ /dev/null
@@ -1,50 +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.shardingsphere.example</groupId>
- <artifactId>cluster-mode-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>cluster-mode-spring-boot-mybatis-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-mybatis</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-cluster-mode-repository-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/spring/boot/mybatis/ClusterModeSpringBootMybatisExample.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/spring/boot/mybatis/ClusterModeSpringBootMybatisExa [...]
deleted file mode 100644
index 3f377612654..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/spring/boot/mybatis/ClusterModeSpringBootMybatisExample.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.shardingsphere.example.cluster.mode.spring.boot.mybatis;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.ComponentScan;
-
-import java.sql.SQLException;
-
-@ComponentScan("org.apache.shardingsphere.example.core.mybatis")
-@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
-@SpringBootApplication(exclude = JtaAutoConfiguration.class)
-public class ClusterModeSpringBootMybatisExample {
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = SpringApplication.run(ClusterModeSpringBootMybatisExample.class, args)) {
- ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
deleted file mode 100644
index b1007a7e508..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
+++ /dev/null
@@ -1,30 +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.
- -->
-
-<!DOCTYPE configuration
- PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-config.dtd">
-<configuration>
- <mappers>
- <mapper resource="META-INF/mappers/AddressMapper.xml" />
- <mapper resource="META-INF/mappers/OrderMapper.xml" />
- <mapper resource="META-INF/mappers/OrderItemMapper.xml" />
- <mapper resource="META-INF/mappers/UserMapper.xml" />
- <mapper resource="META-INF/mappers/ShadowUserMapper.xml" />
- </mappers>
-</configuration>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-encrypt.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-encrypt.properties
deleted file mode 100644
index 9bb1889c15b..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-encrypt.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:cloud-zookeeper-encrypt.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-readwrite-splitting.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-readwrite-splitting.properties
deleted file mode 100644
index 4b9df21a259..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-readwrite-splitting.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:cloud-zookeeper-readwrite-splitting.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-shadow.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-shadow.properties
deleted file mode 100644
index a3ebe10712d..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-shadow.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:cloud-zookeeper-shadow.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-sharding-databases-tables.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-sharding-databases-tables.properties
deleted file mode 100644
index 3fbcfac5414..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-cloud-zookeeper-sharding-databases-tables.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:cloud-zookeeper-sharding-databases-tables.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-encrypt.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-encrypt.properties
deleted file mode 100644
index 7ab2446289b..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-encrypt.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:local-zookeeper-encrypt.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-readwrite-splitting.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-readwrite-splitting.properties
deleted file mode 100644
index 9564fa2df02..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-readwrite-splitting.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:local-zookeeper-readwrite-splitting.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-shadow.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-shadow.properties
deleted file mode 100644
index ea0cd79f925..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-shadow.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:local-zookeeper-shadow.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-sharding-databases-tables.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-sharding-databases-tables.properties
deleted file mode 100644
index 6a22124a323..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application-local-zookeeper-sharding-databases-tables.properties
+++ /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.
-#
-
-spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSphereDriver
-spring.datasource.url=jdbc:shardingsphere:classpath:local-zookeeper-sharding-databases-tables.yaml
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application.properties b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application.properties
deleted file mode 100644
index 0f46739430d..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/application.properties
+++ /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.
-#
-
-mybatis.config-location=classpath:META-INF/mybatis-config.xml
-# TODO Fix ShardingSphereDrive cluster mode start
-#spring.profiles.active=local-zookeeper-sharding-databases-tables
-spring.profiles.active=cloud-zookeeper-sharding-databases-tables
-
-#spring.profiles.active=local-zookeeper-readwrite-splitting
-#spring.profiles.active=cloud-zookeeper-readwrite-splitting
-
-#spring.profiles.active=local-zookeeper-encrypt
-#spring.profiles.active=cloud-zookeeper-encrypt
-
-#spring.profiles.active=local-zookeeper-shadow
-#spring.profiles.active=cloud-zookeeper-shadow
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-encrypt.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-encrypt.yaml
deleted file mode 100644
index 019df212d1f..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-encrypt.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_encrypt
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-readwrite-splitting.yaml
deleted file mode 100644
index 34f73337f5c..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-readwrite-splitting.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_readwrite_ds
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-shadow.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-shadow.yaml
deleted file mode 100644
index 31f7c2b27b7..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-shadow.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_shadow
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-sharding-databases-tables.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-sharding-databases-tables.yaml
deleted file mode 100644
index d45f8649eb2..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/cloud-zookeeper-sharding-databases-tables.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_sharding
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml
deleted file mode 100644
index 9a14a90654e..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_encrypt
- server-lists: localhost:2181
-
-dataSources:
- ds_encrypt:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !ENCRYPT
- tables:
- t_order:
- columns:
- status:
- cipherColumn: status
- encryptorName: status_encryptor
- encryptors:
- status_encryptor:
- type: AES
- props:
- aes-key-value: 123456
-
-props:
- queryWithCipherColumn: true
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml
deleted file mode 100644
index 44835cc21a5..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml
+++ /dev/null
@@ -1,58 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_readwrite_ds
- server-lists: localhost:2181
-
-dataSources:
- write_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds:
- staticStrategy:
- writeDataSourceName: write_ds
- readDataSourceNames:
- - read_ds_0
- - read_ds_1
- loadBalancerName: round_robin
- loadBalancers:
- round_robin:
- type: ROUND_ROBIN
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml
deleted file mode 100644
index 9f82acfe3cb..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml
+++ /dev/null
@@ -1,81 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_shadow
- server-lists: localhost:2181
-
-dataSources:
- ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- shadow_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/shadow_demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !SHADOW
- dataSources:
- shadow_data_source:
- productionDataSourceName: ds
- shadowDataSourceName: shadow_ds
- tables:
- t_user:
- dataSourceNames:
- - shadow_data_source
- shadowAlgorithmNames:
- - user_id_insert_match_algorithm
- - user_id_delete_match_algorithm
- - user_id_select_match_algorithm
- - simple_hint_algorithm
- shadowAlgorithms:
- user_id_insert_match_algorithm:
- type: VALUE_MATCH
- props:
- operation: insert
- column: user_type
- value: '1'
- user_id_delete_match_algorithm:
- type: VALUE_MATCH
- props:
- operation: delete
- column: user_type
- value: '1'
- user_id_select_match_algorithm:
- type: VALUE_MATCH
- props:
- operation: select
- column: user_type
- value: '1'
- simple_hint_algorithm:
- type: SIMPLE_HINT
- props:
- shadow: 'true'
- foo: bar
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml
deleted file mode 100644
index 43255b399ae..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_sharding
- server-lists: localhost:2181
-
-dataSources:
- ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !SHARDING
- tables:
- t_order:
- actualDataNodes: ds_$->{0..1}.t_order_$->{0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- t_order_item:
- actualDataNodes: ds_$->{0..1}.t_order_item_$->{0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- keyGenerateStrategy:
- column: order_item_id
- keyGeneratorName: snowflake
- bindingTables:
- - t_order
- - t_order_item
- broadcastTables:
- - t_address
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: database-inline
-
- shardingAlgorithms:
- database-inline:
- type: INLINE
- props:
- algorithm-expression: ds_$->{user_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_$->{order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_$->{order_id % 2}
-
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/logback.xml
deleted file mode 100644
index 1aec2e0c923..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,34 +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.
- -->
-
-<configuration>
- <property name="log.context.name" value="cluster-mode-spring-boot-mybatis-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/pom.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/pom.xml
deleted file mode 100644
index bf26c8298f3..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/pom.xml
+++ /dev/null
@@ -1,51 +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.shardingsphere.example</groupId>
- <artifactId>cluster-mode-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>cluster-mode-spring-namespace-mybatis-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>config-utility</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-mybatis</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-cluster-mode-repository-zookeeper</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/spring/namespace/mybatis/ClusterModeSpringNamespaceMybatisExample.java b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/spring/namespace/mybatis/Cluste [...]
deleted file mode 100644
index 6ddee9eee91..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/cluster/mode/spring/namespace/mybatis/ClusterModeSpringNamespaceMybatisExample.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.shardingsphere.example.cluster.mode.spring.namespace.mybatis;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.apache.shardingsphere.example.type.RegistryCenterType;
-import org.apache.shardingsphere.example.type.ShardingType;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.sql.SQLException;
-
-public final class ClusterModeSpringNamespaceMybatisExample {
-
- // TODO Fix ShardingSphereDrive cluster mode start
-// private static ShardingType shardingType = ShardingType.SHARDING_DATABASES_AND_TABLES;
-// private static ShardingType shardingType = ShardingType.SHARDING_READWRITE_SPLITTING;
-// private static ShardingType shardingType = ShardingType.ENCRYPT;
- private static ShardingType shardingType = ShardingType.SHADOW;
-
- private static boolean loadConfigFromRegCenter = false;
-// private static boolean loadConfigFromRegCenter = true;
-
- private static RegistryCenterType registryCenterType = RegistryCenterType.ZOOKEEPER;
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(getApplicationFile())) {
- ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-
- private static String getApplicationFile() {
- switch (shardingType) {
- case SHARDING_DATABASES_AND_TABLES:
- return String.format("META-INF/%s/%s/application-sharding-databases-tables.xml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- case SHARDING_READWRITE_SPLITTING:
- return String.format("META-INF/%s/%s/application-readwrite-splitting.xml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- case ENCRYPT:
- return String.format("META-INF/%s/%s/application-encrypt.xml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- case SHADOW:
- return String.format("META-INF/%s/%s/application-shadow.xml", registryCenterType.name().toLowerCase(), loadConfigFromRegCenter ? "cloud" : "local");
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-encrypt.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-encrypt.xml
deleted file mode 100644
index 0407dd44785..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-encrypt.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="encryptDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:cloud-zookeeper-encrypt.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="encryptDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="encryptDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-readwrite-splitting.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-readwrite-splitting.xml
deleted file mode 100644
index e6921c9e997..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-readwrite-splitting.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="readWriteSplittingDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:cloud-zookeeper-readwrite-splitting.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="readWriteSplittingDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="readWriteSplittingDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-shadow.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-shadow.xml
deleted file mode 100644
index f5a991f0d5f..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-shadow.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="shadowDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:cloud-zookeeper-shadow.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="shadowDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="shadowDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-sharding-databases-tables.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-sharding-databases-tables.xml
deleted file mode 100644
index 0a83d842626..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/cloud/application-sharding-databases-tables.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="shardingDatabasesTablesDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:cloud-zookeeper-sharding-databases-tables.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="shardingDatabasesTablesDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="shardingDatabasesTablesDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-encrypt.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-encrypt.xml
deleted file mode 100644
index f0b97280623..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-encrypt.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="encryptDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:local-zookeeper-encrypt.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="encryptDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="encryptDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-readwrite-splitting.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-readwrite-splitting.xml
deleted file mode 100644
index f3211ad8dfc..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-readwrite-splitting.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="readWriteSplittingDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:local-zookeeper-readwrite-splitting.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="readWriteSplittingDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="readWriteSplittingDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-shadow.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-shadow.xml
deleted file mode 100644
index 1c16a64cdba..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-shadow.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="shadowDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:local-zookeeper-shadow.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="shadowDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="shadowDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-sharding-databases-tables.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-sharding-databases-tables.xml
deleted file mode 100644
index 5bf7787a6ab..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/local/application-sharding-databases-tables.xml
+++ /dev/null
@@ -1,51 +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:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="shardingDatabasesTablesDataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.apache.shardingsphere.driver.ShardingSphereDriver" />
- <property name="url" value="jdbc:shardingsphere:classpath:local-zookeeper-sharding-databases-tables.yaml" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="shardingDatabasesTablesDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="shardingDatabasesTablesDataSource" />
- <property name="mapperLocations" value="classpath*:META-INF/mappers/*.xml" />
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/registry-center.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/registry-center.xml
deleted file mode 100644
index f60147b83ad..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/META-INF/zookeeper/registry-center.xml
+++ /dev/null
@@ -1,31 +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:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:cluster="http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/cluster"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/cluster http://shardingsphere.apache.org/schema/shardingsphere/mode-repository/cluster/repository.xsd">
- <cluster:repository id="clusterRepository" type="ZooKeeper" namespace="regCenter" server-lists="localhost:2181">
- <props>
- <prop key="max-retries">3</prop>
- <prop key="operation-timeout-milliseconds">3000</prop>
- </props>
- </cluster:repository>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-encrypt.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-encrypt.yaml
deleted file mode 100644
index 019df212d1f..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-encrypt.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_encrypt
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-readwrite-splitting.yaml
deleted file mode 100644
index 34f73337f5c..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-readwrite-splitting.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_readwrite_ds
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-shadow.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-shadow.yaml
deleted file mode 100644
index 31f7c2b27b7..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-shadow.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_shadow
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-sharding-databases-tables.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-sharding-databases-tables.yaml
deleted file mode 100644
index d45f8649eb2..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/cloud-zookeeper-sharding-databases-tables.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_sharding
- server-lists: localhost:2181
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml
deleted file mode 100644
index 498e0ee9a13..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml
+++ /dev/null
@@ -1,60 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_encrypt
- server-lists: localhost:2181
-
-dataSources:
- demo_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !ENCRYPT
- tables:
- t_user:
- columns:
- username:
- cipherColumn: username
- encryptorName: name_encryptor
- pwd:
- cipherColumn: pwd
- assistedQueryColumn: assisted_query_pwd
- assistedQueryEncryptorName: assisted_encryptor
- encryptorName: pwd_encryptor
- encryptors:
- name_encryptor:
- type: AES
- props:
- aes-key-value: 123456
- pwd_encryptor:
- type: assistedTest
- assisted_encryptor:
- type: AES
- props:
- aes-key-value: 123456abc
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml
deleted file mode 100644
index 6c97ce20dfe..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml
+++ /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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_readwrite_ds
- server-lists: localhost:2181
-
-dataSources:
- write_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !READWRITE_SPLITTING
- dataSources:
- demo_ds:
- staticStrategy:
- writeDataSourceName: write_ds
- readDataSourceNames:
- - read_ds_0
- - read_ds_1
- loadBalancerName: randomStrategy
- loadBalancers:
- randomStrategy:
- type: RANDOM
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml
deleted file mode 100644
index b3244eb0474..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml
+++ /dev/null
@@ -1,81 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_shadow
- server-lists: localhost:2181
-
-dataSources:
- ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- shadow_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/shadow_demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !SHADOW
- dataSources:
- shadow_data_source:
- productionDataSourceName: ds
- shadowDataSourceName: shadow_ds
- tables:
- t_user:
- dataSourceNames:
- - shadow_data_source
- shadowAlgorithmNames:
- - user_id_insert_match_algorithm
- - user_id_delete_match_algorithm
- - user_id_select_match_algorithm
- - simple_hint_algorithm
- shadowAlgorithms:
- user_id_insert_match_algorithm:
- type: REGEX_MATCH
- props:
- operation: insert
- column: user_type
- regex: [1]
- user_id_delete_match_algorithm:
- type: REGEX_MATCH
- props:
- operation: delete
- column: user_type
- regex: [1]
- user_id_select_match_algorithm:
- type: REGEX_MATCH
- props:
- operation: select
- column: user_type
- regex: [1]
- simple_hint_algorithm:
- type: SIMPLE_HINT
- props:
- shadow: true
- foo: bar
-
-props:
- sql-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml
deleted file mode 100644
index e4a2fd469a3..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml
+++ /dev/null
@@ -1,89 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: demo_spring_boot_ds_sharding
- server-lists: localhost:2181
-
-dataSources:
- demo_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- demo_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !SHARDING
- tables:
- t_order:
- actualDataNodes: demo_ds_$->{0..1}.t_order_$->{0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- t_order_item:
- actualDataNodes: demo_ds_$->{0..1}.t_order_item_$->{0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- keyGenerateStrategy:
- column: order_item_id
- keyGeneratorName: snowflake
- bindingTables:
- - t_order,t_order_item
- broadcastTables:
- - t_address
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: database_inline
-
- shardingAlgorithms:
- database_inline:
- type: INLINE
- props:
- algorithm-expression: demo_ds_$->{user_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_$->{order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_$->{order_id % 2}
-
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
-
-props:
- spl-show: true
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/logback.xml
deleted file mode 100644
index 57694fa1932..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,34 +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.
- -->
-
-<configuration>
- <property name="log.context.name" value="cluster-mode-spring-namespace-mybatis-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/pom.xml b/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/pom.xml
deleted file mode 100644
index 47a5a074a0e..00000000000
--- a/examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/pom.xml
+++ /dev/null
@@ -1,37 +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.shardingsphere.example</groupId>
- <artifactId>single-feature-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>cluster-mode-example</artifactId>
- <name>${project.artifactId}</name>
- <packaging>pom</packaging>
-
- <modules>
- <module>cluster-mode-raw-jdbc-example</module>
- <module>cluster-mode-spring-boot-mybatis-example</module>
- <module>cluster-mode-spring-namespace-mybatis-example</module>
- </modules>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml b/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
index b4f0c4ca4db..b1d62e0c958 100644
--- a/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
+++ b/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
@@ -30,7 +30,6 @@
<name>${project.artifactId}</name>
<modules>
- <module>cluster-mode-example</module>
<module>sharding-example</module>
<module>transaction-example</module>
</modules>