# 3.3 小结

* JdbcTemplate 大大简化了 JDBC 的工作。
* 当需要知道数据库生成的 id 时，可以同时使用 PreparedStatementCreator 和 KeyHolder。
* 为了方便执行数据插入，使用 SimpleJdbcInsert。
* Spring Data JPA 使得 JPA 持久化就像编写存储库接口一样简单。


---

# Agent Instructions: 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:

```
GET https://potoyang.gitbook.io/spring-in-action-v5/di-3-zhang-chu-li-shu-ju/3.3-xiao-jie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
