You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by su...@apache.org on 2022/11/17 03:19:52 UTC
[shardingsphere] branch master updated: Modified ftl configuration of the shadow rule (#22225)
This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 b5f5c35656c Modified ftl configuration of the shadow rule (#22225)
b5f5c35656c is described below
commit b5f5c35656cd2d854de5268c9c9864949deb74a6
Author: Guocheng Tang <to...@apache.org>
AuthorDate: Thu Nov 17 11:19:46 2022 +0800
Modified ftl configuration of the shadow rule (#22225)
---
.../resources/template/jdbc/java/config/shadow.ftl | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 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 1c33cd5e645..60694ce83c5 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 Collection<ShadowDataSourceConfiguration> createShadowDataSources() {
- Collection<ShadowDataSourceConfiguration> result = new LinkedList<>();
- result.add(new ShadowDataSourceConfiguration("shadow-data-source", "ds_0", "ds_1"));
- return result;
+ private Map<String, ShadowTableConfiguration> createShadowTables() {
+ Map<String, ShadowTableConfiguration> result = new LinkedHashMap<>();
+ result.put("t_order", new ShadowTableConfiguration(createDataSourceNames(), createShadowAlgorithmNames()));
+ return result;
}
private Collection<String> createShadowAlgorithmNames() {
@@ -47,13 +47,13 @@
result.add("shadow-data-source");
return result;
}
-
- private Map<String, ShadowDataSourceConfiguration> createShadowDataSources() {
- Map<String, ShadowDataSourceConfiguration> result = new LinkedHashMap<>();
- result.put("shadow-data-source", new ShadowDataSourceConfiguration("ds_0", "ds_1"));
+
+ private Collection<ShadowDataSourceConfiguration> createShadowDataSources() {
+ Collection<ShadowDataSourceConfiguration> result = new LinkedList<>();
+ result.add(new ShadowDataSourceConfiguration("shadow-data-source", "ds_0", "ds_1"));
return result;
}
-
+
private Map<String, AlgorithmConfiguration> createShadowAlgorithmConfigurations() {
Map<String, AlgorithmConfiguration> result = new LinkedHashMap<>();
Properties orderTypeInsertProps = new Properties();