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 1621d3b8e46 remove db discovery in example (#25250)
1621d3b8e46 is described below
commit 1621d3b8e46f06b30b6328dabcd25770485660b7
Author: Guocheng Tang <[email protected]>
AuthorDate: Thu Apr 20 14:44:09 2023 +0800
remove db discovery in example (#25250)
* remove db discovery in example
* add more feature
---
.../shardingsphere-example-generator/README.md | 22 ++++-----
.../shardingsphere-example-generator/README_ZH.md | 22 ++++-----
.../feature/type/DBDiscoveryExampleScenario.java | 55 ----------------------
...nerator.scenario.feature.FeatureExampleScenario | 1 -
.../src/main/resources/config.yaml | 3 +-
5 files changed, 23 insertions(+), 80 deletions(-)
diff --git a/examples/shardingsphere-example-generator/README.md
b/examples/shardingsphere-example-generator/README.md
index 72691678ac1..96e20cabdbc 100644
--- a/examples/shardingsphere-example-generator/README.md
+++ b/examples/shardingsphere-example-generator/README.md
@@ -16,14 +16,14 @@ Generated codes:
`target/generated-sources/shardingsphere-${product}-sample`
## Configuration Item Explanation
-| *Name* | *Description* | *Options*
|
-| :---------- | ----------------- |
:-----------------------------------------------------------------------------------------------------------------------------------
|
-| product | product | jdbc, proxy
|
-| mode | operating mode | cluster-zookeeper, cluster-etcd,
standalone
|
-| transaction | transaction type | local, xa-atomikos, xa-narayana
|
-| features | feature set | sharding, readwrite-splitting,
db-discovery, encrypt
|
-| frameworks | framework set | jdbc, spring-boot-starter-jdbc,
spring-boot-starter-jpa, spring-boot-starter-mybatis, spring-namespace-jpa,
spring-namespace-mybatis |
-| host | database host |
|
-| port | database port |
|
-| username | database username |
|
-| password | database password |
|
+| *Name* | *Description* | *Options*
|
+| :---------- | -----------------
|:-------------------------------------------------------------------------------------------------------------------------------------------------|
+| product | product | jdbc, proxy
|
+| mode | operating mode | cluster-zookeeper, cluster-etcd,
standalone
|
+| transaction | transaction type | local, xa-atomikos, xa-narayana
|
+| features | feature set | sharding, readwrite-splitting, encrypt,
shadow, mask
|
+| frameworks | framework set | jdbc, spring-boot-starter-jdbc,
spring-boot-starter-jpa, spring-boot-starter-mybatis, spring-namespace-jpa,
spring-namespace-mybatis |
+| host | database host |
|
+| port | database port |
|
+| username | database username |
|
+| password | database password |
|
diff --git a/examples/shardingsphere-example-generator/README_ZH.md
b/examples/shardingsphere-example-generator/README_ZH.md
index f795292fbae..1921c0ed2b0 100644
--- a/examples/shardingsphere-example-generator/README_ZH.md
+++ b/examples/shardingsphere-example-generator/README_ZH.md
@@ -16,14 +16,14 @@
## 配置项说明
-| *属性名称* | *说明* | *可选项*
|
-| :---------- | ---------- |
:--------------------------------------------------------------------------------------------------------------------------------
|
-| product | 产品 | jdbc、proxy
|
-| mode | 运行模式 | cluster-zookeeper、cluster-etcd、standalone
|
-| transaction | 事务类型 | local, xa-atomikos, xa-narayana
|
-| features | 功能 | sharding、readwrite-splitting、db-discovery、encrypt
|
-| frameworks | 框架 |
jdbc、spring-boot-starter-jdbc、spring-boot-starter-jpa、spring-boot-starter-mybatis、spring-namespace-jpa、spring-namespace-mybatis
|
-| host | 数据库主机名 |
|
-| port | 数据库端口 |
|
-| username | 数据库用户名 |
|
-| password | 数据库密码 |
|
+| *属性名称* | *说明* | *可选项*
|
+| :---------- | ----------
|:----------------------------------------------------------------------------------------------------------------------------------------------|
+| product | 产品 | jdbc、proxy
|
+| mode | 运行模式 | cluster-zookeeper、cluster-etcd、standalone
|
+| transaction | 事务类型 | local, xa-atomikos, xa-narayana
|
+| features | 功能 | sharding, readwrite-splitting, encrypt, shadow,
mask
|
+| frameworks | 框架 |
jdbc、spring-boot-starter-jdbc、spring-boot-starter-jpa、spring-boot-starter-mybatis、spring-namespace-jpa、spring-namespace-mybatis
|
+| host | 数据库主机名 |
|
+| port | 数据库端口 |
|
+| username | 数据库用户名 |
|
+| password | 数据库密码 |
|
diff --git
a/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/scenario/feature/type/DBDiscoveryExampleScenario.java
b/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/scenario/feature/type/DBDiscoveryExampleScenario.java
deleted file mode 100644
index 53e5cdaa7a9..00000000000
---
a/examples/shardingsphere-example-generator/src/main/java/org/apache/shardingsphere/example/generator/scenario/feature/type/DBDiscoveryExampleScenario.java
+++ /dev/null
@@ -1,55 +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.generator.scenario.feature.type;
-
-import
org.apache.shardingsphere.example.generator.scenario.feature.FeatureExampleScenario;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
-/**
- * DB discovery example scenario.
- */
-public final class DBDiscoveryExampleScenario implements
FeatureExampleScenario {
-
- @Override
- public Map<String, String> getJavaClassTemplateMap() {
- return Collections.emptyMap();
- }
-
- @Override
- public Map<String, String> getResourceTemplateMap() {
- return Collections.emptyMap();
- }
-
- @Override
- public Collection<String> getJavaClassPaths() {
- return Collections.emptySet();
- }
-
- @Override
- public Collection<String> getResourcePaths() {
- return Collections.emptySet();
- }
-
- @Override
- public String getType() {
- return "db-discovery";
- }
-}
diff --git
a/examples/shardingsphere-example-generator/src/main/resources/META-INF/services/org.apache.shardingsphere.example.generator.scenario.feature.FeatureExampleScenario
b/examples/shardingsphere-example-generator/src/main/resources/META-INF/services/org.apache.shardingsphere.example.generator.scenario.feature.FeatureExampleScenario
index fc8308717b1..2aa5135091f 100644
---
a/examples/shardingsphere-example-generator/src/main/resources/META-INF/services/org.apache.shardingsphere.example.generator.scenario.feature.FeatureExampleScenario
+++
b/examples/shardingsphere-example-generator/src/main/resources/META-INF/services/org.apache.shardingsphere.example.generator.scenario.feature.FeatureExampleScenario
@@ -19,5 +19,4 @@
org.apache.shardingsphere.example.generator.scenario.feature.type.ShardingExampl
org.apache.shardingsphere.example.generator.scenario.feature.type.ReadwriteSplittingExampleScenario
org.apache.shardingsphere.example.generator.scenario.feature.type.EncryptExampleScenario
org.apache.shardingsphere.example.generator.scenario.feature.type.ShadowExampleScenario
-org.apache.shardingsphere.example.generator.scenario.feature.type.DBDiscoveryExampleScenario
org.apache.shardingsphere.example.generator.scenario.feature.type.MaskExampleScenario
diff --git
a/examples/shardingsphere-example-generator/src/main/resources/config.yaml
b/examples/shardingsphere-example-generator/src/main/resources/config.yaml
index ffc9f485f02..1ceff6c8574 100644
--- a/examples/shardingsphere-example-generator/src/main/resources/config.yaml
+++ b/examples/shardingsphere-example-generator/src/main/resources/config.yaml
@@ -34,13 +34,12 @@ transactions:
- xa-bitronix
- base-seata
-# supported: sharding,readwrite-splitting,encrypt,shadow,db-discovery,mask
+# supported: sharding,readwrite-splitting,encrypt,shadow,mask
features:
- sharding
- readwrite-splitting
- encrypt
- shadow
- - db-discovery
- mask
#
supported:jdbc,spring-boot-starter-jdbc,spring-boot-starter-jpa,spring-boot-starter-mybatis,spring-namespace-jdbc,spring-namespace-jpa,spring-namespace-mybatis