zjcnb commented on a change in pull request #12240:
URL: https://github.com/apache/shardingsphere/pull/12240#discussion_r702841263
##########
File path:
docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/yaml.cn.md
##########
@@ -32,28 +32,30 @@ weight = 2
以下示例将 ZooKeeper 作为配置中心和注册中心。
```yaml
-governance:
- registryCenter:
- type: Zookeeper
- namespace: governance_ds
- serverLists: localhost:2181
+mode:
+ type: Cluster
+ repository:
+ type: ZooKeeper
+ props:
+ namespace: demo_yaml_ds_sharding
+ server-lists: localhost:2181
overwrite: true
```
```java
-// 创建 GovernanceShardingSphereDataSource
-DataSource dataSource =
YamlGovernanceShardingSphereDataSourceFactory.createDataSource(yamlFile);
+// 创建 ShardingSphereDataSource
+DataSource dataSource =
YamlShardingSphereDataSourceFactory.createDataSource(yamlFile);
```
-## 使用 GovernanceShardingSphereDataSource
+## 使用 ShardingSphereDataSource
-通过 YamlGovernanceShardingSphereDataSourceFactory 工厂创建的
GovernanceShardingSphereDataSource 实现自 JDBC 的标准接口 DataSource。
+通过 YamlShardingSphereDataSourceFactory 工厂创建的 ShardingSphereDataSource 实现自 JDBC
的标准接口 DataSource。
可通过 DataSource 选择使用原生 JDBC,或JPA, MyBatis 等 ORM 框架。
Review comment:
yes, i will modify it.
##########
File path:
docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/yaml.cn.md
##########
@@ -32,28 +32,30 @@ weight = 2
以下示例将 ZooKeeper 作为配置中心和注册中心。
```yaml
-governance:
- registryCenter:
- type: Zookeeper
- namespace: governance_ds
- serverLists: localhost:2181
+mode:
+ type: Cluster
+ repository:
+ type: ZooKeeper
+ props:
+ namespace: demo_yaml_ds_sharding
+ server-lists: localhost:2181
overwrite: true
```
```java
-// 创建 GovernanceShardingSphereDataSource
-DataSource dataSource =
YamlGovernanceShardingSphereDataSourceFactory.createDataSource(yamlFile);
+// 创建 ShardingSphereDataSource
+DataSource dataSource =
YamlShardingSphereDataSourceFactory.createDataSource(yamlFile);
```
-## 使用 GovernanceShardingSphereDataSource
+## 使用 ShardingSphereDataSource
-通过 YamlGovernanceShardingSphereDataSourceFactory 工厂创建的
GovernanceShardingSphereDataSource 实现自 JDBC 的标准接口 DataSource。
+通过 YamlShardingSphereDataSourceFactory 工厂创建的 ShardingSphereDataSource 实现自 JDBC
的标准接口 DataSource。
可通过 DataSource 选择使用原生 JDBC,或JPA, MyBatis 等 ORM 框架。
Review comment:
ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]