Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add badge #2

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README-zh.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# 如何用 Hibernate 连接到 TiDB

[![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)

[English](/README.md) | 中文

这是 PingCAP 为 mysqlclient 编写的用于连接 TIDB 的示例项目
这是 PingCAP 为 Hibernate 编写的用于连接 TIDB 的示例项目

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

Expand Down Expand Up @@ -56,7 +58,7 @@ cd tidb-java-hibernate-quickstart

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

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)获取不同操作系统下证书的路径
TiDB Serverless 要求使用 secure connection,因此 `USE_SSL` 的值应为 `true`

6. 保存文件。

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# How to Connect to TiDB Using Hibernate

[![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)

English | [中文](/README-zh.md)

This is an example project by PingCAP for connecting to TiDB using the mysqlclient library.
This is an example project by PingCAP for connecting to TiDB using the Hibernate library.

> 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.

Expand Down Expand Up @@ -56,7 +58,7 @@ cd tidb-java-hibernate-quickstart

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

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.
TiDB Serverless requires the use of a secure connection, so the value of `USE_SSL` should be set to `true`.

6. Save the file.

Expand Down