> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/29.-working-with-sql-databases/29.3.-jpa-and-spring-data.md).

# 29.3. JPA和Spring Data

Java持久化API是一个让你将对象映射为关系数据库的标准技术。`spring-boot-starter-data-jpa` POM提供了一种快速上手的方式，它提供以下关键依赖：

* Hibernate：一个非常流行的JPA实现。
* Spring Data JPA：让实现基于JPA的repositories更容易。
* Spring ORMs：Spring框架支持的核心ORM。

**注** 我们不想在这涉及太多关于JPA或[Spring Data](https://projects.spring.io/spring-data/)的细节。你可以参考来自[spring.io](https://spring.io/)的指南[使用JPA获取数据](https://spring.io/guides/gs/accessing-data-jpa/)，并阅读[Spring Data JPA](https://projects.spring.io/spring-data-jpa/)和[Hibernate](https://hibernate.org/orm/documentation/)的参考文档。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/29.-working-with-sql-databases/29.3.-jpa-and-spring-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
