# 3.2包层次结构

Spring框架的JDBC抽象框架由四个不同的软件包组成：

* core：org.springframework.jdbc.core软件包包含JdbcTemplate类及其各种回调接口，以及各种相关类。名为org.springframework.jdbc.core.simple的子程序包包含SimpleJdbcInsert和SimpleJdbcCall类。另一个名为org.springframework.jdbc.core.namedparam的子程序包包含NamedParameterJdbcTemplate类和相关的支持类。请参阅使用JDBC核心类控制基本JDBC处理和错误处理，JDBC批处理操作和使用SimpleJdbc类简化JDBC操作。
* datasource：org.springframework.jdbc.datasource软件包包含一个实用程序类，用于轻松访问DataSource和各种简单DataSource实现，可用于在Java EE容器之外测试和运行未修改的JDBC代码。名为org.springfamework.jdbc.datasource.embedded的子包为使用Java数据库引擎（例如HSQL，H2和Derby）创建嵌入式数据库提供了支持。请参阅控制数据库连接和嵌入式数据库支持。
* object：org.springframework.jdbc.object包包含一些类，这些类将RDBMS查询，更新和存储过程表示为线程安全的可重用对象。请参阅将JDBC操作建模为Java对象。尽管查询返回的对象自然会与数据库断开连接，但是JDO对此方法进行了建模。较高级别的JDBC抽象取决于org.springframework.jdbc.core软件包中的较低级别的抽象。
* support：org.springframework.jdbc.support软件包提供SQLException转换功能和一些实用程序类。 JDBC处理期间引发的异常将转换为org.springframework.dao包中定义的异常。这意味着使用Spring JDBC抽象层的代码不需要实现JDBC或RDBMS特定的错误处理。所有翻译的异常均未选中，这使你可以选择捕获可以从中恢复的异常，同时将其他异常传播到调用方。请参见使用SQLExceptionTranslator。


---

# 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://docs.flydean.com/spring-framework-documentation5/dataaccess/3.jdbc/3.2package-hierarchy.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.
