You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by so...@apache.org on 2022/11/16 12:46:42 UTC

[shardingsphere] branch master updated: update example ftl after the shadow rule updated (#22200)

This is an automated email from the ASF dual-hosted git repository.

soulasuna 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 0632530e4fa update example ftl after the shadow rule updated (#22200)
0632530e4fa is described below

commit 0632530e4fafb4a97cbc4e2178d066e453af69aa
Author: Guocheng Tang <to...@apache.org>
AuthorDate: Wed Nov 16 20:46:30 2022 +0800

    update example ftl after the shadow rule updated (#22200)
    
    * Remove the mixed examples and use the automatically generated examples.
    
    * merger master
    
    * Optimize shadow rule configuration for ftl
---
 .../src/main/resources/template/jdbc/java/config/shadow.ftl       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/java/config/shadow.ftl b/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/java/config/shadow.ftl
index d459bc2966f..1c33cd5e645 100644
--- a/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/java/config/shadow.ftl
+++ b/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/java/config/shadow.ftl
@@ -27,10 +27,10 @@
         return new SQLParserRuleConfiguration(true, new CacheOption(128, 1024L), new CacheOption(2000, 65535L));
     }
     
-    private Map<String, ShadowTableConfiguration> createShadowTables() {
-        Map<String, ShadowTableConfiguration> result = new LinkedHashMap<>();
-        result.put("t_order", new ShadowTableConfiguration(createDataSourceNames(), createShadowAlgorithmNames()));
-        return result;
+    private Collection<ShadowDataSourceConfiguration> createShadowDataSources() {
+        Collection<ShadowDataSourceConfiguration> result = new LinkedList<>();
+        result.add(new ShadowDataSourceConfiguration("shadow-data-source", "ds_0", "ds_1"));
+        return result; 
     }
     
     private Collection<String> createShadowAlgorithmNames() {