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

zhaojinchao 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 de756c7  Rename data-model.yaml to config.yaml (#16397)
de756c7 is described below

commit de756c7d85db0e610e0ba61b25acc349a6bde058
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Mar 26 19:42:59 2022 +0800

    Rename data-model.yaml to config.yaml (#16397)
---
 examples/shardingsphere-example-generator/README.md      |  4 ++--
 examples/shardingsphere-example-generator/README_ZH.md   |  2 +-
 .../example/generator/ExampleGenerator.java              |  2 +-
 .../example/generator/ExampleGeneratorFactory.java       |  4 ++--
 .../{data-model/data-model.yaml => config.yaml}          | 16 ++++++++--------
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/examples/shardingsphere-example-generator/README.md 
b/examples/shardingsphere-example-generator/README.md
index 252fd07..714292e 100644
--- a/examples/shardingsphere-example-generator/README.md
+++ b/examples/shardingsphere-example-generator/README.md
@@ -4,9 +4,9 @@ Project uses freemarker template engine to generate example 
codes of ShardingSph
 
 ## Usage
 
-1. Configure parameter
+1. Configure YAML file
 
-File: `src/main/resources/data-model/data-model.yaml`
+File: `src/main/resources/config.yaml`
 
 2. Generate code
 
diff --git a/examples/shardingsphere-example-generator/README_ZH.md 
b/examples/shardingsphere-example-generator/README_ZH.md
index 7ebe8c8..92e0e0e 100644
--- a/examples/shardingsphere-example-generator/README_ZH.md
+++ b/examples/shardingsphere-example-generator/README_ZH.md
@@ -6,7 +6,7 @@
 
 1. 配置参数
 
-文件位置:`src/main/resources/data-model/data-model.yaml` 
+文件位置:`src/main/resources/config.yaml` 
 
 2. 生成代码
 
diff --git 
a/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGenerator.java
 
b/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGenerator.java
index e901cf2..c435914 100644
--- 
a/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGenerator.java
+++ 
b/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGenerator.java
@@ -28,7 +28,7 @@ import java.util.Map;
  */
 public interface ExampleGenerator {
     
-    String OUTPUT_PATH = 
"./examples/shardingsphere-sample/shardingsphere-example-generator/target/generated-sources"
+    String OUTPUT_PATH = 
"./examples/shardingsphere-example-generator/target/generated-sources"
             + "/shardingsphere-${product}-sample/${feature?replace(',', 
'-')}--${framework}--${mode}--${transaction}/";
     
     String RESOURCES_PATH = "src/main/resources";
diff --git 
a/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGeneratorFactory.java
 
b/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGeneratorFactory.java
index 1e7d0a8..c0b640b 100644
--- 
a/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGeneratorFactory.java
+++ 
b/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/ExampleGeneratorFactory.java
@@ -34,7 +34,7 @@ import java.util.ServiceLoader;
  */
 public final class ExampleGeneratorFactory {
     
-    private static final String DATA_MODEL_PATH = 
"/data-model/data-model.yaml";
+    private static final String CONFIG_FILE = "/config.yaml";
     
     private final Configuration templateConfig;
     
@@ -57,7 +57,7 @@ public final class ExampleGeneratorFactory {
      */
     @SuppressWarnings("unchecked")
     public void generate() throws TemplateException, IOException {
-        try (InputStream input = 
ExampleGeneratorFactory.class.getResourceAsStream(DATA_MODEL_PATH)) {
+        try (InputStream input = 
ExampleGeneratorFactory.class.getResourceAsStream(CONFIG_FILE)) {
             Map<String, String> dataModel = new Yaml().loadAs(input, 
Map.class);
             String product = dataModel.get("product");
             dataModel.put("shardingsphereVersion", 
ShardingSphereVersion.VERSION);
diff --git 
a/examples/shardingsphere-example-generator/src/main/resources/data-model/data-model.yaml
 b/examples/shardingsphere-example-generator/src/main/resources/config.yaml
similarity index 61%
rename from 
examples/shardingsphere-example-generator/src/main/resources/data-model/data-model.yaml
rename to 
examples/shardingsphere-example-generator/src/main/resources/config.yaml
index 97bc95e..78c0e23 100644
--- 
a/examples/shardingsphere-example-generator/src/main/resources/data-model/data-model.yaml
+++ b/examples/shardingsphere-example-generator/src/main/resources/config.yaml
@@ -2,32 +2,32 @@
 # 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 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
+# 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.
+# 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.
 #
 
-# support: jdbc、proxy
+# supported: jdbc,proxy
 product: jdbc
 
-# support: memory、cluster-zookeeper、cluster-etcd、standalone-file
+# supported: memory,cluster-zookeeper,cluster-etcd,standalone-file
 mode: memory
 
-# support: local
+# supported: local
 transaction: local
 
-# support: sharding、readwrite-splitting、encrypt、db-discovery
+# supported: sharding,readwrite-splitting,encrypt,db-discovery
 features: sharding,readwrite-splitting,encrypt,shadow,db-discovery
 
-# 
support:jdbc、spring-boot-starter-jdbc、spring-boot-starter-jpa、spring-boot-starter-mybatis、spring-namespace-jpa、spring-namespace-mybatis
+# 
supported:jdbc,spring-boot-starter-jdbc,spring-boot-starter-jpa,spring-boot-starter-mybatis,spring-namespace-jpa,spring-namespace-mybatis
 frameworks: 
jdbc,spring-boot-starter-jdbc,spring-boot-starter-jpa,spring-boot-starter-mybatis,spring-namespace-jpa,spring-namespace-mybatis
 
 host: localhost

Reply via email to