diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/java/org/apache/shardingsphere/example/shadow/table/spring/namespace/ExampleMain.java b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/java/org/apache/shardingsphere/example/shadow/table/spring/namespace/ExampleMain.java index fbb985b560f3277268bf7df05f5cc66020268cee..f8e7cfad3ca3b7ec0b829852ab7e75423fdef0cf 100644 --- a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/java/org/apache/shardingsphere/example/shadow/table/spring/namespace/ExampleMain.java +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/java/org/apache/shardingsphere/example/shadow/table/spring/namespace/ExampleMain.java @@ -27,6 +27,9 @@ import java.sql.SQLException; public class ExampleMain { private static final String CONFIG_FILE = "META-INF/application-shadow-databases.xml"; +// private static final String CONFIG_FILE = "META-INF/application-sharding-shadow-databases.xml"; +// private static final String CONFIG_FILE = "META-INF/application-master-slave-shadow-databases.xml"; +// private static final String CONFIG_FILE = "META-INF/application-encrypt-shadow-databases.xml"; public static void main(final String[] args) throws SQLException { try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) { diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-encrypt-shadow-databases.xml b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-encrypt-shadow-databases.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a97dd4cf9480894f09153db156c8b81113f7036 --- /dev/null +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-encrypt-shadow-databases.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 123456 + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-master-slave-shadow-databases.xml b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-master-slave-shadow-databases.xml new file mode 100644 index 0000000000000000000000000000000000000000..05e61bee1488b792468a9a3bd9ec4aed239205d9 --- /dev/null +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-master-slave-shadow-databases.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-shadow-databases.xml b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-shadow-databases.xml index 197523ec33ff406133baaf88178203781e3b3d28..606072c8bebbfd34cfa26a900eda83d68d76be0a 100644 --- a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-shadow-databases.xml +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-shadow-databases.xml @@ -60,7 +60,7 @@ - ${sql_show} + true diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-sharding-shadow-databases.xml b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-sharding-shadow-databases.xml new file mode 100644 index 0000000000000000000000000000000000000000..b6919c8d098adab29bd909fa33bf4c1afe29441d --- /dev/null +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-namespace-example/src/main/resources/META-INF/application-sharding-shadow-databases.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ds_${user_id % 2} + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + +