Skip to content

Commit 1f3ec2a

Browse files
author
Cheese
authored
Merge pull request #2 from tidb-samples/feat-badge
feat: add badge
2 parents 317167c + dd91bed commit 1f3ec2a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README-zh.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# 如何用 Hibernate 连接到 TiDB
22

3+
[![Java CI with Maven](https://github.com/tidb-samples/tidb-java-hibernate-quickstart/actions/workflows/maven.yml/badge.svg)](https://github.com/tidb-samples/tidb-java-hibernate-quickstart/actions/workflows/maven.yml)
4+
35
[English](/README.md) | 中文
46

5-
这是 PingCAP 为 mysqlclient 编写的用于连接 TIDB 的示例项目
7+
这是 PingCAP 为 Hibernate 编写的用于连接 TIDB 的示例项目
68

79
> TiDB 是一个兼容 MySQL 的数据库。[Hibernate](https://hibernate.org/orm/) 是当前比较流行的开源 Java 应用持久层框架,且 Hibernate 在版本 `6.0.0.Beta2` 及以上支持了 TiDB 方言,完美适配了 TiDB 的特性。
810
@@ -56,7 +58,7 @@ cd tidb-java-hibernate-quickstart
5658

5759
注意替换 `{}` 中的占位符为 **Connect** 窗口中获得的值。
5860

59-
TiDB Serverless 要求使用 secure connection,由于 mysqlclient 的 `ssl_mode` 默认为 `PREFERRED`,所以不需要你手动指定 `CA_PATH`,设置为空即可。但如果你有特殊原因需要手动指定 `CA_PATH`,可以参考 [TiDB Cloud 文档](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-clusters#root-certificate-default-path)获取不同操作系统下证书的路径
61+
TiDB Serverless 要求使用 secure connection,因此 `USE_SSL` 的值应为 `true`
6062

6163
6. 保存文件。
6264

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# How to Connect to TiDB Using Hibernate
22

3+
[![Java CI with Maven](https://github.com/tidb-samples/tidb-java-hibernate-quickstart/actions/workflows/maven.yml/badge.svg)](https://github.com/tidb-samples/tidb-java-hibernate-quickstart/actions/workflows/maven.yml)
4+
35
English | [中文](/README-zh.md)
46

5-
This is an example project by PingCAP for connecting to TiDB using the mysqlclient library.
7+
This is an example project by PingCAP for connecting to TiDB using the Hibernate library.
68

79
> TiDB is a MySQL-compatible database. [Hibernate](https://hibernate.org/orm/) is a currently popular open-source Java application persistence framework. Hibernate supports TiDB dialect from version `6.0.0.Beta2` and above, perfectly adapting to TiDB's features.
810
@@ -56,7 +58,7 @@ cd tidb-java-hibernate-quickstart
5658

5759
Replace placeholders `{}` with values obtained from the **Connect** window.
5860

59-
TiDB Serverless requires a secure connection. Since mysqlclient's `ssl_mode` default is `PREFERRED`, no need to specify `CA_PATH`, set it empty. However, if you need to specify `CA_PATH` for special reasons, refer to [TiDB Cloud documentation](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-clusters#root-certificate-default-path) for certificate paths on different operating systems.
61+
TiDB Serverless requires the use of a secure connection, so the value of `USE_SSL` should be set to `true`.
6062

6163
6. Save the file.
6264

0 commit comments

Comments
 (0)