# Hibernate 和 JPA 因素页面

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/idea/llms.txt).

> **TL;DR**
> `文件 | 项目结构 | 模块 | <module> | Hibernate`  或  `JPA`
>
>
>
> `文件 | 项目结构 | Facets | Hibernate (<module>)`  或  `JPA (<module>)`

使用此页面来管理配置和对象/关系映射文件，并下载缺失的库。

|  条目  |  描述  |
| --- | --- |
|  描述符  |  使用此部分的控件来管理配置和 O/R 映射文件，例如 Hibernate 的  `hibernate.cfg.xml` 以及 JPA 的  `persistence.xml` 和  `orm.xml` 。    ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)  `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (NetBeans), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS))。 添加现有文件或创建新文件。 在打开的对话框中，指定文件位置和名称。       ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.edit.svg)  `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS))。 将选定文件替换为另一个（已存在的）文件。 在打开的对话框中，指定您想用作替换的文件。       ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.remove.svg)  `Alt+Delete` (Windows), `⌘ ⌦` (macOS), `⌘ ⌦` (IntelliJ IDEA Classic (macOS)), `⌘ ⌦` (macOS System Shortcuts), `Alt+Delete` (XWin), `Alt+Delete` (GNOME), `Alt+Delete` (KDE), `Alt+Delete` (Emacs), `Alt+Delete` (Sublime Text), `⌘ ⌦` (Sublime Text (macOS)), `Ctrl+R, D` (Visual Studio), `⌘ R, D` (Visual Studio (macOS)), `Alt+Delete` (NetBeans), `Alt+Delete` (Eclipse), `Alt+Delete` (Eclipse (macOS))。 从列表中移除选定的文件。 在打开的对话框中，指定您是否要物理删除文件。 （否则，只会移除文件与该 facet 的关联。）     |
|  默认 JPA 提供程序  |  对于 JPA: 创建  `persistence.xml`  时，此设置会影响该文件中的  `<provider>`  元素。 例如，将为 EclipseLink 生成  `<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>` 。 如果选择了   <no provider>  ，则不会有  `<provider>`  元素。  |
|  修复  |  如果缺少库，请点击此按钮以解决问题。  |

## See also

### 过程

[Jakarta Persistence (JPA)](jakarta-persistence-jpa.html) [Hibernate](hibernate.html)

