RaigorJiang commented on code in PR #22664:
URL: https://github.com/apache/shardingsphere/pull/22664#discussion_r1039295304
##########
docs/document/content/quick-start/shardingsphere-jdbc-quick-start.cn.md:
##########
@@ -28,38 +28,42 @@ Apache ShardingSphere-JDBC 可以通过 `Java`,`YAML`,`Spring 命名空间`
```xml
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+ <artifactId>shardingsphere-jdbc-core</artifactId>
<version>${latest.release.version}</version>
</dependency>
```
> 注意:请将 `${latest.release.version}` 更改为实际的版本号。
+3. 创建 YAML 配置文件
+```yaml
+# JDBC 逻辑库名称。在集群模式中,使用该参数来联通 ShardingSphere-JDBC 与 ShardingSphere-Proxy。
+# 默认值:logic_db
+databaseName (?):
-3. 编辑 `application.yml`。
-
-
-
-```java
-spring:
- shardingsphere:
- datasource:
- names: ds_0, ds_1
- ds_0:
- type: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- jdbcUrl:
jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- ds_1:
- type: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- jdbcUrl:
jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- rules:
- sharding:
- tables:
- ...
+mode:
+
+dataSources:
+
+rules:
+- !FOO_XXX
+ ...
+- !BAR_XXX
+ ...
+
+props:
+ key_1: value_1
+ key_2: value_2
```
+
+4. 以 `spring boot` 为例,编辑 `application.properties`。
+
+```properties
+# 配置 DataSource Driver
Review Comment:
Need a blank line after code block.
##########
docs/document/content/quick-start/shardingsphere-jdbc-quick-start.en.md:
##########
@@ -28,37 +28,42 @@ Please refer to [User
Manual](/en/user-manual/shardingsphere-jdbc/) for more det
```xml
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+ <artifactId>shardingsphere-jdbc-core</artifactId>
<version>${latest.release.version}</version>
</dependency>
```
> Notice: Please change `${latest.release.version}` to the actual version.
+3. Create YAML configuration file
+```yaml
+# JDBC database name. In cluster mode, use this parameter to connect
ShardingSphere-JDBC and ShardingSphere-Proxy.
+# Default:logic_db
+databaseName (?):
-3. Edit `application.yml`.
-
-
-```java
-spring:
- shardingsphere:
- datasource:
- names: ds_0, ds_1
- ds_0:
- type: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- jdbcUrl:
jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- ds_1:
- type: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- jdbcUrl:
jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
- rules:
- sharding:
- tables:
- ...
+mode:
+
+dataSources:
+
+rules:
+- !FOO_XXX
+ ...
+- !BAR_XXX
+ ...
+
+props:
+ key_1: value_1
+ key_2: value_2
```
+
+4. Take `spring boot` as an example, edit `application.properties`.
+
+```properties
+# Configuring DataSource Drivers
Review Comment:
Blank line missed.
--
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]