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

update guide-java-spring-boot #16128

Merged
merged 6 commits into from
Jan 30, 2024
Merged

update guide-java-spring-boot #16128

merged 6 commits into from
Jan 30, 2024

Conversation

Weaxs
Copy link
Contributor

@Weaxs Weaxs commented Jan 11, 2024

First-time contributors' checklist

What is changed, added or deleted? (Required)

Fix #15778

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v7.6 (TiDB 7.6 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.4 (TiDB 7.4 versions)
  • v7.3 (TiDB 7.3 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot ti-chi-bot bot added area/develop This PR relates to the area of TiDB App development. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 11, 2024
@Weaxs
Copy link
Contributor Author

Weaxs commented Jan 11, 2024

/label 2024-tidb-docs-dash

@ti-chi-bot ti-chi-bot bot added the 2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event. label Jan 11, 2024
@qiancai qiancai added the translation/doing This PR’s assignee is translating this PR. label Jan 11, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jan 11, 2024
@qiancai qiancai requested a review from Icemap January 11, 2024 09:29

Spring Data JPA 通过 `@Repository` 接口来管理数据。你需要继承 `JpaRepository` 接口,以使用其提供的增删改查函数
通过继承 `JpaRepository<T, ID>` 接口,注册用于管理实体的Bean;`JpaRepository<T, ID>` 接口也提供了基础的增删改查函数
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. JpaRepository 为泛型接口的接口名称,<T, ID> 为泛型类型。
  2. 并非接口提供增删改查函数,此处是由 Spring IoC 后提供实现类的自动装配。换言之,是由实现类提供的基础增删改查。
  3. 注册用于管理实体的Bean,此句将产生模糊指代。实体、Bean 均可指代 PlayerBean,且 Bean 请替换措辞。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写成这样可以吗?

PlayerRepository 通过继承 JpaRepository 接口, 由 JpaRepositoryFactoryBean 为其自动注册对应的 Repository Bean。同时,JpaRepository 接口的默认实现类 SimpleJpaRepository 提供了增删改查函数的具体实现。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Icemap Icemap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 30, 2024
Copy link

ti-chi-bot bot commented Jan 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-30 08:42:48.242840938 +0000 UTC m=+1468609.807138640: ☑️ agreed by Icemap.

@Icemap
Copy link
Member

Icemap commented Jan 30, 2024

感谢 @Weaxs 对 TiDB 文档的贡献。

@qiancai
Copy link
Collaborator

qiancai commented Jan 30, 2024

/approve

@qiancai qiancai added the lgtm label Jan 30, 2024
Copy link

ti-chi-bot bot commented Jan 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiancai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jan 30, 2024
@qiancai qiancai added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. labels Jan 30, 2024
@qiancai qiancai added needs-cherry-pick-release-7.3 needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Jan 30, 2024
@qiancai
Copy link
Collaborator

qiancai commented Jan 30, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit d0766c1 into pingcap:master Jan 30, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #16443.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #16444.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.3: #16445.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.4: #16446.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #16447.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.6: #16448.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event. approved area/develop This PR relates to the area of TiDB App development. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. translation/doing This PR’s assignee is translating this PR.
Development

Successfully merging this pull request may close these issues.

Debug TiDB Documentation: 使用 Spring Boot 连接到 TiDB
5 participants