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/11/03 03:05:58 UTC
[shardingsphere] branch master updated: Remove the mixed examples and use the automatically generated examples. (#21859)
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 5d749361363 Remove the mixed examples and use the automatically generated examples. (#21859)
5d749361363 is described below
commit 5d74936136398279eb6f63cadbb101ab3e477327
Author: Guocheng Tang <to...@apache.org>
AuthorDate: Thu Nov 3 11:05:49 2022 +0800
Remove the mixed examples and use the automatically generated examples. (#21859)
---
.../mixed-feature-example/pom.xml | 35 -----
.../sharding-readwrite-splitting-example/pom.xml | 39 -----
.../pom.xml | 42 ------
...dwriteSplittingRawJavaConfigurationExample.java | 44 ------
...eSplittingRawJavaRangeConfigurationExample.java | 47 ------
...dwriteSplittingRawYamlConfigurationExample.java | 42 ------
...eSplittingRawYamlRangeConfigurationExample.java | 42 ------
...dingReadwriteSplittingConfigurationPrecise.java | 94 ------------
...ardingReadwriteSplittingConfigurationRange.java | 94 ------------
.../splitting/raw/factory/DataSourceFactory.java | 36 -----
.../raw/factory/RangeDataSourceFactory.java | 36 -----
.../raw/factory/YamlDataSourceFactory.java | 42 ------
.../raw/factory/YamlRangeDataSourceFactory.java | 42 ------
.../sharding-readwrite-splitting-range.yaml | 122 ---------------
.../META-INF/sharding-readwrite-splitting.yaml | 130 ----------------
.../src/main/resources/logback.xml | 34 -----
.../pom.xml | 50 -------
...dingReadwriteSplittingSpringBootJpaExample.java | 41 ------
...ication-sharding-readwrite-splitting.properties | 95 ------------
.../src/main/resources/application.properties | 22 ---
.../src/main/resources/logback.xml | 36 -----
.../pom.xml | 52 -------
...ReadwriteSplittingSpringBootMybatisExample.java | 41 ------
.../src/main/resources/META-INF/mybatis-config.xml | 28 ----
...ication-sharding-readwrite-splitting.properties | 94 ------------
.../src/main/resources/application.properties | 20 ---
.../src/main/resources/logback.xml | 34 -----
.../pom.xml | 43 ------
...eadwriteSplittingSpringNamespaceJpaExample.java | 36 -----
.../application-sharding-readwrite-splitting.xml | 163 ---------------------
.../src/main/resources/logback.xml | 34 -----
.../pom.xml | 43 ------
...riteSplittingSpringNamespaceMybatisExample.java | 36 -----
.../application-sharding-readwrite-splitting.xml | 152 -------------------
.../src/main/resources/logback.xml | 34 -----
examples/shardingsphere-jdbc-example/pom.xml | 1 -
36 files changed, 1976 deletions(-)
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/pom.xml
deleted file mode 100644
index 2227508f45b..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/pom.xml
+++ /dev/null
@@ -1,35 +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>shardingsphere-jdbc-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>mixed-feature-example</artifactId>
- <packaging>pom</packaging>
- <name>${project.artifactId}</name>
-
- <modules>
- <module>sharding-readwrite-splitting-example</module>
- </modules>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/pom.xml
deleted file mode 100644
index 043ee1bf909..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/pom.xml
+++ /dev/null
@@ -1,39 +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>mixed-feature-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>sharding-readwrite-splitting-example</artifactId>
- <packaging>pom</packaging>
- <name>${project.artifactId}</name>
-
- <modules>
- <module>sharding-readwrite-splitting-raw-jdbc-example</module>
- <module>sharding-readwrite-splitting-spring-boot-jpa-example</module>
- <module>sharding-readwrite-splitting-spring-boot-mybatis-example</module>
- <module>sharding-readwrite-splitting-spring-namespace-jpa-example</module>
- <module>sharding-readwrite-splitting-spring-namespace-mybatis-example</module>
- </modules>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/pom.xml
deleted file mode 100644
index 7490df4b6f9..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/pom.xml
+++ /dev/null
@@ -1,42 +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>sharding-readwrite-splitting-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>sharding-readwrite-splitting-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</groupId>
- <artifactId>shardingsphere-jdbc-core</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawJavaConfigurationExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shardi [...]
deleted file mode 100644
index e27ba696e84..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawJavaConfigurationExample.java
+++ /dev/null
@@ -1,44 +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.sharding.readwrite.splitting.raw;
-
-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.sharding.readwrite.splitting.raw.factory.DataSourceFactory;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-/*
- * Please make sure primary replica data replication sync on MySQL is running correctly. Otherwise this example will query empty data from replica.
- */
-public final class ShardingReadwriteSplittingRawJavaConfigurationExample {
-
- private static ShardingType shardingType = ShardingType.SHARDING_READWRITE_SPLITTING;
-
- public static void main(final String[] args) throws SQLException {
- DataSource dataSource = DataSourceFactory.newInstance(shardingType);
- ExampleExecuteTemplate.run(getExampleService(dataSource));
- }
-
- private static ExampleService getExampleService(final DataSource dataSource) {
- return new OrderServiceImpl(dataSource);
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawJavaRangeConfigurationExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/s [...]
deleted file mode 100644
index 164cb5da8ed..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawJavaRangeConfigurationExample.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.raw;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.apache.shardingsphere.example.core.jdbc.repository.AddressRepositoryImpl;
-import org.apache.shardingsphere.example.core.jdbc.repository.OrderItemRepositoryImpl;
-import org.apache.shardingsphere.example.core.jdbc.repository.RangeOrderRepositoryImpl;
-import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
-import org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.factory.RangeDataSourceFactory;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-/*
- * Please make sure primary replica data replication sync on MySQL is running correctly. Otherwise this example will query empty data from replica.
- */
-public final class ShardingReadwriteSplittingRawJavaRangeConfigurationExample {
-
- private static ShardingType shardingType = ShardingType.SHARDING_READWRITE_SPLITTING;
-
- public static void main(final String[] args) throws SQLException {
- DataSource dataSource = RangeDataSourceFactory.newInstance(shardingType);
- ExampleExecuteTemplate.run(getExampleService(dataSource));
- }
-
- private static ExampleService getExampleService(final DataSource dataSource) {
- return new OrderServiceImpl(new RangeOrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawYamlConfigurationExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shardi [...]
deleted file mode 100644
index be4cd90b4d8..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawYamlConfigurationExample.java
+++ /dev/null
@@ -1,42 +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.sharding.readwrite.splitting.raw;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.jdbc.service.AccountServiceImpl;
-import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
-import org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.factory.YamlDataSourceFactory;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.io.IOException;
-import java.sql.SQLException;
-
-/*
- * Please make sure primary replica data replication sync on MySQL is running correctly. Otherwise this example will query empty data from replica.
- */
-public final class ShardingReadwriteSplittingRawYamlConfigurationExample {
-
- private static ShardingType shardingType = ShardingType.SHARDING_READWRITE_SPLITTING;
-
- public static void main(final String[] args) throws SQLException, IOException {
- DataSource dataSource = YamlDataSourceFactory.newInstance(shardingType);
- ExampleExecuteTemplate.run(new OrderServiceImpl(dataSource));
- ExampleExecuteTemplate.run(new AccountServiceImpl(dataSource));
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawYamlRangeConfigurationExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/s [...]
deleted file mode 100644
index 85984f64def..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/ShardingReadwriteSplittingRawYamlRangeConfigurationExample.java
+++ /dev/null
@@ -1,42 +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.sharding.readwrite.splitting.raw;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.jdbc.service.AccountServiceImpl;
-import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
-import org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.factory.YamlRangeDataSourceFactory;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.io.IOException;
-import java.sql.SQLException;
-
-/*
- * Please make sure primary replica data replication sync on MySQL is running correctly. Otherwise this example will query empty data from replica.
- */
-public final class ShardingReadwriteSplittingRawYamlRangeConfigurationExample {
-
- private static ShardingType shardingType = ShardingType.SHARDING_READWRITE_SPLITTING;
-
- public static void main(final String[] args) throws SQLException, IOException {
- DataSource dataSource = YamlRangeDataSourceFactory.newInstance(shardingType);
- ExampleExecuteTemplate.run(new OrderServiceImpl(dataSource));
- ExampleExecuteTemplate.run(new AccountServiceImpl(dataSource));
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/config/ShardingReadwriteSplittingConfigurationPrecise.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shardi [...]
deleted file mode 100644
index 2d3051d7f1c..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/config/ShardingReadwriteSplittingConfigurationPrecise.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.config;
-
-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.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.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.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class ShardingReadwriteSplittingConfigurationPrecise implements ExampleConfiguration {
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(createDataSourceMap(),
- Arrays.asList(createShardingRuleConfiguration(), createReadwriteSplittingConfiguration()), new Properties());
- }
-
- private static 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;
- }
-
- private ShardingRuleConfiguration createShardingRuleConfiguration() {
- ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- result.getTables().add(createOrderTableRuleConfiguration());
- result.getTables().add(createOrderItemTableRuleConfiguration());
- result.getBindingTableGroups().add("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 static ShardingTableRuleConfiguration createOrderTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
- result.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("order_id", "snowflake"));
- return result;
- }
-
- private static ShardingTableRuleConfiguration createOrderItemTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
- result.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("order_item_id", "snowflake"));
- return result;
- }
-
- private static ReadwriteSplittingRuleConfiguration createReadwriteSplittingConfiguration() {
- 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, "");
- 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,"");
- return new ReadwriteSplittingRuleConfiguration(Arrays.asList(dataSourceConfiguration1, dataSourceConfiguration2), Collections.emptyMap());
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/config/ShardingReadwriteSplittingConfigurationRange.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding [...]
deleted file mode 100644
index ec42733c159..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/config/ShardingReadwriteSplittingConfigurationRange.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.config;
-
-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.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.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.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class ShardingReadwriteSplittingConfigurationRange implements ExampleConfiguration {
-
- @Override
- public DataSource getDataSource() throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(
- createDataSourceMap(), Arrays.asList(createShardingRuleConfiguration(), createReadwriteSplittingConfiguration()), new Properties());
- }
-
- private static 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;
- }
-
- private ShardingRuleConfiguration createShardingRuleConfiguration() {
- ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- result.getTables().add(createOrderTableRuleConfiguration());
- result.getTables().add(createOrderItemTableRuleConfiguration());
- result.getBindingTableGroups().add("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 static ShardingTableRuleConfiguration createOrderTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
- result.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("order_id", "snowflake"));
- return result;
- }
-
- private static ShardingTableRuleConfiguration createOrderItemTableRuleConfiguration() {
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
- result.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("order_item_id", "snowflake"));
- return result;
- }
-
- private static ReadwriteSplittingRuleConfiguration createReadwriteSplittingConfiguration() {
- 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());
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/DataSourceFactory.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/f [...]
deleted file mode 100644
index da00b5ac03b..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/DataSourceFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.factory;
-
-import org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.config.ShardingReadwriteSplittingConfigurationPrecise;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public final class DataSourceFactory {
-
- public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
- switch (shardingType) {
- case SHARDING_READWRITE_SPLITTING:
- return new ShardingReadwriteSplittingConfigurationPrecise().getDataSource();
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/RangeDataSourceFactory.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/ [...]
deleted file mode 100644
index 27fe94dab54..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/RangeDataSourceFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.factory;
-
-import org.apache.shardingsphere.example.sharding.readwrite.splitting.raw.config.ShardingReadwriteSplittingConfigurationRange;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public final class RangeDataSourceFactory {
-
- public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
- switch (shardingType) {
- case SHARDING_READWRITE_SPLITTING:
- return new ShardingReadwriteSplittingConfigurationRange().getDataSource();
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/YamlDataSourceFactory.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/r [...]
deleted file mode 100644
index 382805736e9..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/YamlDataSourceFactory.java
+++ /dev/null
@@ -1,42 +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.sharding.readwrite.splitting.raw.factory;
-
-import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.io.IOException;
-import java.sql.SQLException;
-
-public final class YamlDataSourceFactory {
-
- public static DataSource newInstance(final ShardingType shardingType) throws SQLException, IOException {
- switch (shardingType) {
- case SHARDING_READWRITE_SPLITTING:
- return YamlShardingSphereDataSourceFactory.createDataSource(getFile("/META-INF/sharding-readwrite-splitting.yaml"));
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- }
-
- private static File getFile(final String fileName) {
- return new File(YamlDataSourceFactory.class.getResource(fileName).getFile());
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/YamlRangeDataSourceFactory.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitt [...]
deleted file mode 100644
index 6b7ed985ff2..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/raw/factory/YamlRangeDataSourceFactory.java
+++ /dev/null
@@ -1,42 +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.sharding.readwrite.splitting.raw.factory;
-
-import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.example.type.ShardingType;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.io.IOException;
-import java.sql.SQLException;
-
-public final class YamlRangeDataSourceFactory {
-
- public static DataSource newInstance(final ShardingType shardingType) throws SQLException, IOException {
- switch (shardingType) {
- case SHARDING_READWRITE_SPLITTING:
- return YamlShardingSphereDataSourceFactory.createDataSource(getFile("/META-INF/sharding-readwrite-splitting-range.yaml"));
- default:
- throw new UnsupportedOperationException(shardingType.name());
- }
- }
-
- private static File getFile(final String fileName) {
- return new File(YamlRangeDataSourceFactory.class.getResource(fileName).getFile());
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/META-INF/sharding-readwrite-splitting-range.yaml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/META-INF/sharding-readwrite-splitting-range.yaml
deleted file mode 100644
index d03304fecae..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/META-INF/sharding-readwrite-splitting-range.yaml
+++ /dev/null
@@ -1,122 +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.
-#
-
-dataSources:
- write_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_0_read_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_0_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_0_read_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_0_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_1_read_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_1_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_1_read_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_1_read_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: standard-test-tbl
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- t_order_item:
- actualDataNodes: ds_${0..1}.t_order_item_${0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: standard-test-tbl
- keyGenerateStrategy:
- column: order_item_id
- keyGeneratorName: snowflake
- bindingTables:
- - t_order,t_order_item
- broadcastTables:
- - t_address
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard-test-db
-
- shardingAlgorithms:
- standard-test-db:
- type: STANDARD_TEST_DB
- standard-test-tbl:
- type: STANDARD_TEST_TBL
-
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
-
-- !READWRITE_SPLITTING
- dataSources:
- ds_0:
- staticStrategy:
- writeDataSourceName: write_ds_0
- readDataSourceNames:
- - write_ds_0_read_0
- - write_ds_0_read_1
- loadBalancerName: roundRobin
- ds_1:
- staticStrategy:
- writeDataSourceName: write_ds_1
- readDataSourceNames:
- - write_ds_1_read_0
- - write_ds_1_read_1
- loadBalancerName: roundRobin
- loadBalancers:
- roundRobin:
- type: ROUND_ROBIN
-
-props:
- sql-show: false
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/META-INF/sharding-readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/META-INF/sharding-readwrite-splitting.yaml
deleted file mode 100644
index 2bf88437c4e..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/META-INF/sharding-readwrite-splitting.yaml
+++ /dev/null
@@ -1,130 +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.
-#
-
-dataSources:
- write_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_0_read_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_0_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_0_read_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_0_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_1_read_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_1_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
- write_ds_1_read_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds_1_read_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_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
-
-- !READWRITE_SPLITTING
- dataSources:
- ds_0:
- staticStrategy:
- writeDataSourceName: write_ds_0
- readDataSourceNames:
- - write_ds_0_read_0
- - write_ds_0_read_1
- loadBalancerName: roundRobin
- ds_1:
- staticStrategy:
- writeDataSourceName: write_ds_1
- readDataSourceNames:
- - write_ds_1_read_0
- - write_ds_1_read_1
- loadBalancerName: roundRobin
- loadBalancers:
- roundRobin:
- type: ROUND_ROBIN
-
-props:
- sql-show: false
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-raw-jdbc-example/src/main/resources/logback.xml
deleted file mode 100644
index ba358014363..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-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="sharding-readwrite-splitting-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/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/pom.xml
deleted file mode 100644
index c370eab01a9..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-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>sharding-readwrite-splitting-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>sharding-readwrite-splitting-spring-boot-jpa-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-jpa</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/boot/jpa/ShardingReadwriteSplittingSpringBootJpaExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/java/org/apache/shardingsp [...]
deleted file mode 100644
index c2786e5be77..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/boot/jpa/ShardingReadwriteSplittingSpringBootJpaExample.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.sharding.readwrite.splitting.spring.boot.jpa;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.domain.EntityScan;
-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.jpa")
-@EntityScan(basePackages = "org.apache.shardingsphere.example.core.jpa.entity")
-@SpringBootApplication(exclude = JtaAutoConfiguration.class)
-public class ShardingReadwriteSplittingSpringBootJpaExample {
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = SpringApplication.run(ShardingReadwriteSplittingSpringBootJpaExample.class, args)) {
- ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/application-sharding-readwrite-splitting.properties b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/application-sharding-readwrite-splitting.properties
deleted file mode 100644
index 584779137f0..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/application-sharding-readwrite-splitting.properties
+++ /dev/null
@@ -1,95 +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.shardingsphere.datasource.names=write-ds-0,write-ds-1,write-ds-0-read-0,write-ds-0-read-1,write-ds-1-read-0,write-ds-1-read-1
-
-spring.shardingsphere.datasource.write-ds-0.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-0.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-0.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-0.username=root
-spring.shardingsphere.datasource.write-ds-0.password=
-spring.shardingsphere.datasource.write-ds-0.max-active=16
-
-spring.shardingsphere.datasource.write-ds-0-read-0.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_0_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-0-read-0.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-0-read-0.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-0-read-0.username=root
-spring.shardingsphere.datasource.write-ds-0-read-0.password=
-spring.shardingsphere.datasource.write-ds-0-read-0.max-active=16
-
-spring.shardingsphere.datasource.write-ds-0-read-1.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_0_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-0-read-1.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-0-read-1.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-0-read-1.username=root
-spring.shardingsphere.datasource.write-ds-0-read-1.password=
-spring.shardingsphere.datasource.write-ds-0-read-1.max-active=16
-
-spring.shardingsphere.datasource.write-ds-1.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-1.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-1.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-1.username=root
-spring.shardingsphere.datasource.write-ds-1.password=
-spring.shardingsphere.datasource.write-ds-1.max-active=16
-
-spring.shardingsphere.datasource.write-ds-1-read-0.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_1_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-1-read-0.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-1-read-0.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-1-read-0.username=root
-spring.shardingsphere.datasource.write-ds-1-read-0.password=
-spring.shardingsphere.datasource.write-ds-1-read-0.max-active=16
-
-spring.shardingsphere.datasource.write-ds-1-read-1.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_1_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-1-read-1.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-1-read-1.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-1-read-1.username=root
-spring.shardingsphere.datasource.write-ds-1-read-1.password=
-spring.shardingsphere.datasource.write-ds-1-read-1.max-active=16
-
-spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-column=user_id
-spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-algorithm-name=database-inline
-spring.shardingsphere.rules.sharding.binding-tables[0]=t_order,t_order_item
-spring.shardingsphere.rules.sharding.broadcast-tables=t_address
-
-spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds-$->{0..1}.t_order_$->{0..1}
-spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=t-order-inline
-
-spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.key-generator-name=snowflake
-
-spring.shardingsphere.rules.sharding.tables.t_order_item.actual-data-nodes=ds-$->{0..1}.t_order_item_$->{0..1}
-spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-algorithm-name=t-order-item-inline
-
-spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.column=order_item_id
-spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.key-generator-name=snowflake
-
-spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
-
-spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.type=INLINE
-spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.props.algorithm-expression=ds-$->{user_id % 2}
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-inline.type=INLINE
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-inline.props.algorithm-expression=t_order_$->{order_id % 2}
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-inline.type=INLINE
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-inline.props.algorithm-expression=t_order_item_$->{order_id % 2}
-
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.static-strategy.write-data-source-name=write-ds-0
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.static-strategy.read-data-source-names=write-ds-0-read-0,write-ds-0-read-1
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.static-strategy.write-data-source-name=write-ds-1
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.static-strategy.read-data-source-names=write-ds-1-read-0,write-ds-1-read-1
-
-spring.shardingsphere.props.sql-show=true
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/application.properties b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/application.properties
deleted file mode 100644
index bd6877e52fc..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,22 +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.jpa.properties.hibernate.hbm2ddl.auto=create-drop
-spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
-spring.jpa.properties.hibernate.show_sql=false
-
-spring.profiles.active=sharding-readwrite-splitting
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/logback.xml
deleted file mode 100644
index 97c8df570f6..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-jpa-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,36 +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="sharding-readwrite-splitting-spring-boot-jpa-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>
- <logger name="org.springframework" level="WARN" />
- <logger name="com.zaxxer.hikari" level="WARN" />
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/pom.xml
deleted file mode 100644
index 0654c29f92b..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/pom.xml
+++ /dev/null
@@ -1,52 +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>sharding-readwrite-splitting-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>sharding-readwrite-splitting-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-spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/boot/mybatis/ShardingReadwriteSplittingSpringBootMybatisExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/java/org/a [...]
deleted file mode 100644
index 5acdc7c81b9..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/boot/mybatis/ShardingReadwriteSplittingSpringBootMybatisExample.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.sharding.readwrite.splitting.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 ShardingReadwriteSplittingSpringBootMybatisExample {
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = SpringApplication.run(ShardingReadwriteSplittingSpringBootMybatisExample.class, args)) {
- ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
deleted file mode 100644
index 84a6692078f..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
+++ /dev/null
@@ -1,28 +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"/>
- </mappers>
-</configuration>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties
deleted file mode 100644
index cfd8d54ce14..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-spring.shardingsphere.datasource.names=write-ds-0,write-ds-1,write-ds-0-read-0,write-ds-0-read-1,write-ds-1-read-0,write-ds-1-read-1
-
-spring.shardingsphere.datasource.write-ds-0.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-0.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-0.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-0.username=root
-spring.shardingsphere.datasource.write-ds-0.password=
-spring.shardingsphere.datasource.write-ds-0.max-active=16
-
-spring.shardingsphere.datasource.write-ds-0-read-0.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_0_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-0-read-0.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-0-read-0.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-0-read-0.username=root
-spring.shardingsphere.datasource.write-ds-0-read-0.password=
-spring.shardingsphere.datasource.write-ds-0-read-0.max-active=16
-
-spring.shardingsphere.datasource.write-ds-0-read-1.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_0_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-0-read-1.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-0-read-1.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-0-read-1.username=root
-spring.shardingsphere.datasource.write-ds-0-read-1.password=
-spring.shardingsphere.datasource.write-ds-0-read-1.max-active=16
-
-spring.shardingsphere.datasource.write-ds-1.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-1.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-1.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-1.username=root
-spring.shardingsphere.datasource.write-ds-1.password=
-spring.shardingsphere.datasource.write-ds-1.max-active=16
-
-spring.shardingsphere.datasource.write-ds-1-read-0.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_1_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-1-read-0.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-1-read-0.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-1-read-0.username=root
-spring.shardingsphere.datasource.write-ds-1-read-0.password=
-spring.shardingsphere.datasource.write-ds-1-read-0.max-active=16
-
-spring.shardingsphere.datasource.write-ds-1-read-1.jdbc-url=jdbc:mysql://localhost:3306/demo_write_ds_1_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.write-ds-1-read-1.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.write-ds-1-read-1.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.write-ds-1-read-1.username=root
-spring.shardingsphere.datasource.write-ds-1-read-1.password=
-spring.shardingsphere.datasource.write-ds-1-read-1.max-active=16
-
-spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-column=user_id
-spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-algorithm-name=database-inline
-
-spring.shardingsphere.rules.sharding.binding-tables[0]=t_order,t_order_item
-spring.shardingsphere.rules.sharding.broadcast-tables=t_address
-
-spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds-$->{0..1}.t_order_$->{0..1}
-spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=t-order-inline
-
-spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.key-generator-name=snowflake
-
-spring.shardingsphere.rules.sharding.tables.t_order_item.actual-data-nodes=ds-$->{0..1}.t_order_item_$->{0..1}
-spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-algorithm-name=t-order-item-inline
-
-spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.column=order_item_id
-spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.key-generator-name=snowflake
-
-spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
-
-spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.type=INLINE
-spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.props.algorithm-expression=ds-$->{user_id % 2}
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-inline.type=INLINE
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-inline.props.algorithm-expression=t_order_$->{order_id % 2}
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-inline.type=INLINE
-spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-inline.props.algorithm-expression=t_order_item_$->{order_id % 2}
-
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.static-strategy.write-data-source-name=write-ds-0
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.static-strategy.read-data-source-names=write-ds-0-read-0, write-ds-0-read-1
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.static-strategy.write-data-source-name=write-ds-1
-spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.static-strategy.read-data-source-names=write-ds-1-read-0, write-ds-1-read-1
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application.properties b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application.properties
deleted file mode 100644
index 3d05eecb5f4..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mybatis.config-location=classpath:META-INF/mybatis-config.xml
-
-spring.profiles.active=sharding-readwrite-splitting
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/logback.xml
deleted file mode 100644
index dafd6e9311e..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-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="sharding-readwrite-splitting-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/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/pom.xml
deleted file mode 100644
index a27316f0fac..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/pom.xml
+++ /dev/null
@@ -1,43 +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>sharding-readwrite-splitting-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>sharding-readwrite-splitting-spring-namespace-jpa-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-jpa</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/namespace/jpa/ShardingReadwriteSplittingSpringNamespaceJpaExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/java/o [...]
deleted file mode 100644
index 4b3a5332849..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/namespace/jpa/ShardingReadwriteSplittingSpringNamespaceJpaExample.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.spring.namespace.jpa;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.sql.SQLException;
-
-public final class ShardingReadwriteSplittingSpringNamespaceJpaExample {
-
- private static final String CONFIG_FILE = "META-INF/application-sharding-readwrite-splitting.xml";
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
- ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/resources/META-INF/application-sharding-readwrite-splitting.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/resources/META-INF/application-sharding-readwrite-splitting.xml
deleted file mode 100644
index 56a16792129..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/resources/META-INF/application-sharding-readwrite-splitting.xml
+++ /dev/null
@@ -1,163 +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:p="http://www.springframework.org/schema/p"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource"
- xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
- xmlns:readwrite-splitting="http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting"
- 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
- http://shardingsphere.apache.org/schema/shardingsphere/datasource
- http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/sharding
- http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting
- http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting/readwrite-splitting.xsd
- ">
- <context:annotation-config />
- <context:component-scan base-package="org.apache.shardingsphere.example.core.jpa"/>
-
- <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="dataSource" ref="shardingDataSource" />
- <property name="jpaVendorAdapter">
- <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" p:database="MYSQL" />
- </property>
- <property name="packagesToScan" value="org.apache.shardingsphere.example.core.jpa.entity" />
- <property name="jpaProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
- <prop key="hibernate.hbm2ddl.auto">create-drop</prop>
- <prop key="hibernate.show_sql">false</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" p:entityManagerFactory-ref="entityManagerFactory" />
- <tx:annotation-driven />
-
- <bean id="demo_write_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- <property name="maximumPoolSize" value="16"/>
- </bean>
-
- <bean id="demo_write_ds_0_read_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_0_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- <property name="maximumPoolSize" value="16"/>
- </bean>
-
- <bean id="demo_write_ds_0_read_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_0_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- <property name="maximumPoolSize" value="16"/>
- </bean>
-
- <bean id="demo_write_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- <property name="maximumPoolSize" value="16"/>
- </bean>
-
- <bean id="demo_write_ds_1_read_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_1_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- <property name="maximumPoolSize" value="16"/>
- </bean>
-
- <bean id="demo_write_ds_1_read_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_1_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- <property name="maximumPoolSize" value="16"/>
- </bean>
-
- <readwrite-splitting:load-balance-algorithm id="randomStrategy" type="RANDOM" />
-
- <sharding:sharding-algorithm id="databaseAlgorithm" type="INLINE">
- <props>
- <prop key="algorithm-expression">demo_readwrite_ds_${user_id % 2}</prop>
- </props>
- </sharding:sharding-algorithm>
- <sharding:standard-strategy id="databaseStrategy" sharding-column="user_id" algorithm-ref="databaseAlgorithm" />
-
- <sharding:sharding-algorithm id="orderTableAlgorithm" type="INLINE">
- <props>
- <prop key="algorithm-expression">t_order_${order_id % 2}</prop>
- </props>
- </sharding:sharding-algorithm>
- <sharding:standard-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-ref="orderTableAlgorithm" />
-
- <sharding:sharding-algorithm id="orderItemTableAlgorithm" type="INLINE">
- <props>
- <prop key="algorithm-expression">t_order_item_${order_id % 2}</prop>
- </props>
- </sharding:sharding-algorithm>
- <sharding:standard-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-ref="orderItemTableAlgorithm" />
-
- <sharding:key-generate-algorithm id="snowflakeAlgorithm" type="SNOWFLAKE">
- </sharding:key-generate-algorithm>
-
- <sharding:key-generate-strategy id="orderKeyGenerator" column="order_id" algorithm-ref="snowflakeAlgorithm" />
- <sharding:key-generate-strategy id="itemKeyGenerator" column="order_item_id" algorithm-ref="snowflakeAlgorithm" />
-
- <sharding:rule id="shardingRule">
- <sharding:table-rules>
- <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_readwrite_ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generate-strategy-ref="orderKeyGenerator" />
- <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_readwrite_ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generate-strategy-ref="itemKeyGenerator" />
- </sharding:table-rules>
- <sharding:binding-table-rules>
- <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
- </sharding:binding-table-rules>
- <sharding:broadcast-table-rules>
- <sharding:broadcast-table-rule table="t_address"/>
- </sharding:broadcast-table-rules>
- </sharding:rule>
- <readwrite-splitting:rule id="readWriteSplittingRule">
- <readwrite-splitting:data-source-rule id="demo_readwrite_ds_0" load-balance-algorithm-ref="randomStrategy">
- <readwrite-splitting:static-strategy id="staticStrategyForDs0" write-data-source-name="demo_write_ds_0" read-data-source-names="demo_write_ds_0_read_0, demo_write_ds_0_read_1"/>
- </readwrite-splitting:data-source-rule>
- <readwrite-splitting:data-source-rule id="demo_readwrite_ds_1" load-balance-algorithm-ref="randomStrategy">
- <readwrite-splitting:static-strategy id="staticStrategyForDs0" write-data-source-name="demo_write_ds_1" read-data-source-names="demo_write_ds_1_read_0, demo_write_ds_1_read_1"/>
- </readwrite-splitting:data-source-rule>
- </readwrite-splitting:rule>
-
- <shardingsphere:data-source id="shardingDataSource" data-source-names="demo_write_ds_0,demo_write_ds_1,demo_write_ds_0_read_0, demo_write_ds_0_read_1,demo_write_ds_1_read_0, demo_write_ds_1_read_1" rule-refs="shardingRule, readWriteSplittingRule">
- <props>
- <prop key="sql-show">false</prop>
- </props>
- </shardingsphere:data-source>
-</beans>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-example/src/main/resources/logback.xml
deleted file mode 100644
index 29726940f29..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-jpa-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="sharding-readwrite-splitting-spring-namespace-jpa-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/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/pom.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/pom.xml
deleted file mode 100644
index d6d799a4c27..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/pom.xml
+++ /dev/null
@@ -1,43 +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>sharding-readwrite-splitting-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>sharding-readwrite-splitting-spring-namespace-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-spring-namespace</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/namespace/mybatis/ShardingReadwriteSplittingSpringNamespaceMybatisExample.java b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example [...]
deleted file mode 100644
index bc5d938f123..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/sharding/readwrite/splitting/spring/namespace/mybatis/ShardingReadwriteSplittingSpringNamespaceMybatisExample.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.example.sharding.readwrite.splitting.spring.namespace.mybatis;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.sql.SQLException;
-
-public final class ShardingReadwriteSplittingSpringNamespaceMybatisExample {
-
- private static final String CONFIG_FILE = "META-INF/application-sharding-readwrite-splitting.xml";
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
- ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-}
diff --git a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/resources/META-INF/application-sharding-readwrite-splitting.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/resources/META-INF/application-sharding-readwrite-splitting.xml
deleted file mode 100644
index 56f544a869c..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/resources/META-INF/application-sharding-readwrite-splitting.xml
+++ /dev/null
@@ -1,152 +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"
- xmlns:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource"
- xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
- xmlns:readwrite-splitting="http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting"
- 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
- http://shardingsphere.apache.org/schema/shardingsphere/datasource
- http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/sharding
- http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting
- http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting/readwrite-splitting.xsd
- ">
- <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="demo_write_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
-
- <bean id="demo_write_ds_0_read_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_0_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
-
- <bean id="demo_write_ds_0_read_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_0_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
-
- <bean id="demo_write_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
-
- <bean id="demo_write_ds_1_read_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_1_read_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
-
- <bean id="demo_write_ds_1_read_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_write_ds_1_read_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
-
- <sharding:standard-strategy id="databaseStrategy" sharding-column="user_id" algorithm-ref="inlineDatabaseStrategyAlgorithm" />
- <sharding:standard-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-ref="inlineOrderTableStrategyAlgorithm" />
- <sharding:standard-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-ref="inlineOrderItemTableStrategyAlgorithm" />
-
- <sharding:sharding-algorithm id="inlineDatabaseStrategyAlgorithm" type="INLINE">
- <props>
- <prop key="algorithm-expression">demo_readwrite_ds_${user_id % 2}</prop>
- </props>
- </sharding:sharding-algorithm>
- <sharding:sharding-algorithm id="inlineOrderTableStrategyAlgorithm" type="INLINE">
- <props>
- <prop key="algorithm-expression">t_order_${order_id % 2}</prop>
- </props>
- </sharding:sharding-algorithm>
- <sharding:sharding-algorithm id="inlineOrderItemTableStrategyAlgorithm" type="INLINE">
- <props>
- <prop key="algorithm-expression">t_order_item_${order_item_id % 2}</prop>
- </props>
- </sharding:sharding-algorithm>
-
- <sharding:key-generate-algorithm id="snowflakeAlgorithm" type="SNOWFLAKE">
- </sharding:key-generate-algorithm>
-
- <sharding:key-generate-strategy id="orderKeyGenerator" column="order_id" algorithm-ref="snowflakeAlgorithm" />
- <sharding:key-generate-strategy id="itemKeyGenerator" column="order_item_id" algorithm-ref="snowflakeAlgorithm" />
-
- <readwrite-splitting:load-balance-algorithm id="randomStrategy" type="RANDOM" />
-
- <sharding:rule id="shardingRule">
- <sharding:table-rules>
- <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_readwrite_ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generate-strategy-ref="orderKeyGenerator"/>
- <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_readwrite_ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generate-strategy-ref="itemKeyGenerator"/>
- </sharding:table-rules>
- <sharding:binding-table-rules>
- <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
- </sharding:binding-table-rules>
- <sharding:broadcast-table-rules>
- <sharding:broadcast-table-rule table="t_address"/>
- </sharding:broadcast-table-rules>
- </sharding:rule>
- <readwrite-splitting:rule id="readWriteSplittingRule">
- <readwrite-splitting:data-source-rule id="demo_readwrite_ds_0" load-balance-algorithm-ref="randomStrategy">
- <readwrite-splitting:static-strategy id="StaticStrategyWithDs0" write-data-source-name="demo_write_ds_0" read-data-source-names="demo_write_ds_0_read_0, demo_write_ds_0_read_1"/>
- </readwrite-splitting:data-source-rule>
- <readwrite-splitting:data-source-rule id="demo_readwrite_ds_1" load-balance-algorithm-ref="randomStrategy">
- <readwrite-splitting:static-strategy id="StaticStrategyWithDs1" write-data-source-name="demo_write_ds_1" read-data-source-names="demo_write_ds_1_read_0, demo_write_ds_1_read_1"/>
- </readwrite-splitting:data-source-rule>
- </readwrite-splitting:rule>
-
- <shardingsphere:data-source id="shardingDataSource" data-source-names="demo_write_ds_0,demo_write_ds_0_read_0,demo_write_ds_0_read_1,demo_write_ds_1,demo_write_ds_1_read_0,demo_write_ds_1_read_1" rule-refs="shardingRule, readWriteSplittingRule">
- <props>
- <prop key="sql-show">false</prop>
- </props>
- </shardingsphere:data-source>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="shardingDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="shardingDataSource"/>
- <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/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/resources/logback.xml b/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-namespace-mybatis-example/src/main/resources/logback.xml
deleted file mode 100644
index 415124d1f94..00000000000
--- a/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-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="sharding-readwrite-splitting-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/pom.xml b/examples/shardingsphere-jdbc-example/pom.xml
index 366d43503a7..235d542cf33 100644
--- a/examples/shardingsphere-jdbc-example/pom.xml
+++ b/examples/shardingsphere-jdbc-example/pom.xml
@@ -30,7 +30,6 @@
<name>${project.artifactId}</name>
<modules>
- <module>mixed-feature-example</module>
<module>single-feature-example</module>
</modules>