You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/11/29 08:10:55 UTC
[shardingsphere] branch master updated: update the mode of boot starter (#22502)
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 501ae3af485 update the mode of boot starter (#22502)
501ae3af485 is described below
commit 501ae3af4854c4e95d363dad38ae2a74ea63bccf
Author: CuihongAn <40...@users.noreply.github.com>
AuthorDate: Tue Nov 29 16:10:46 2022 +0800
update the mode of boot starter (#22502)
---
.../spring-boot-starter/mode.cn.md | 2 +-
.../spring-boot-starter/mode.en.md | 72 +++++++++++-----------
2 files changed, 36 insertions(+), 38 deletions(-)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.cn.md
index 0d7f0013a36..20ab5ebb5e6 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.cn.md
@@ -71,4 +71,4 @@ spring.shardingsphere.mode.repository.props.timeToLiveSeconds=60
## 相关参考
- [ZooKeeper 注册中心安装与使用](https://zookeeper.apache.org/doc/r3.7.1/zookeeperStarted.html)
-- - 持久化仓库类型的详情,请参见[内置持久化仓库类型列表](/cn/user-manual/common-config/builtin-algorithm/metadata-repository/)。
+- 持久化仓库类型的详情,请参见[内置持久化仓库类型列表](/cn/user-manual/common-config/builtin-algorithm/metadata-repository/)。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.en.md
index 953755ae426..831ee64e832 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/mode.en.md
@@ -5,36 +5,27 @@ weight = 1
## Parameters
-```yaml
-mode (?): # Default value is Standalone
- type: # Type of mode configuration. Values could be: Standalone or Cluster
- repository (?): # Persist repository configuration
+```properties
+spring.shardingsphere.mode.type= # Type of mode configuration. Value could be: Standalone, Cluster
+spring.shardingsphere.mode.repository= # Persist repository configuration.
```
### Standalone Mode
-```yaml
-mode:
- type: Standalone
- repository:
- type: # Type of persist repository
- props: # Properties of persist repository
- foo_key: foo_value
- bar_key: bar_value
+```properties
+spring.shardingsphere.mode.type=Standalone
+spring.shardingsphere.mode.repository.type= # Type of persist repository
+spring.shardingsphere.mode.repository.props.<key>= # Properties of persist repository
```
### Cluster Mode (recommended)
-```yaml
-mode:
- type: Cluster
- repository:
- type: # Type of persist repository
- props: # Properties of persist repository
- namespace: # Namespace of registry center
- server-lists: # Server lists of registry center
- foo_key: foo_value
- bar_key: bar_value
+```properties
+spring.shardingsphere.mode.type=Cluster
+spring.shardingsphere.mode.repository.type= # Type of persist repository
+spring.shardingsphere.mode.repository.props.namespace= # Namespace of registry center
+spring.shardingsphere.mode.repository.props.server-lists= # Server lists of registry center
+spring.shardingsphere.mode.repository.props.<key>= # Properties of persist repository
```
## Notes
@@ -43,29 +34,36 @@ mode:
1. The `ZooKeeper` registry center is recommended for cluster mode deployment.
1. If there is configuration information in the `ZooKeeper`, please refer to the config information there.
+## Procedure
+1. Import MAVEN dependency.
+
+```xml
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+ <version>${latest.release.version}</version>
+</dependency>
+```
+
+> Note: please change `${latest.release.version}' to the actual version number.
## Sample
### Standalone Mode
-```yaml
-mode:
- type: Standalone
- repository:
- type: JDBC
+```properties
+spring.shardingsphere.mode.type=Standalone
+spring.shardingsphere.mode.repository.type=JDBC
```
### Cluster Mode (recommended)
-```yaml
-mode:
- type: Cluster
- repository:
- type: ZooKeeper
- props:
- namespace: governance
- server-lists: localhost:2181
- retryIntervalMilliseconds: 500
- timeToLiveSeconds: 60
+```properties
+spring.shardingsphere.mode.type=Cluster
+spring.shardingsphere.mode.repository.type=ZooKeeper
+spring.shardingsphere.mode.repository.props.namespace=governance
+spring.shardingsphere.mode.repository.props.server-lists=localhost:2181
+spring.shardingsphere.mode.repository.props.retryIntervalMilliseconds=500
+spring.shardingsphere.mode.repository.props.timeToLiveSeconds=60
```
## Related References