简体   繁体   English

如何在 IntelliJ 社区版中使用 Hibernate?

[英]How to use Hibernate with IntelliJ community edition?

As we know, the Hibernate is supported only in Ultimate Edition of Intellij IDEA.众所周知,Hibernate 仅在 Intellij IDEA 终极版中受支持。 This point is stressed in similar unanswered question too.类似的未回答问题中也强调了这一点。 So I'd like to achieve a partial result with my Community Edition.所以我想用我的社区版实现部分结果。 Namely, I want to create conditions to build and run my RDBMS application.也就是说,我想创造条件来构建和运行我的 RDBMS 应用程序。 No word about the full spectra of IDEA support of RDBMS development.没有关于 IDEA 对 RDBMS 开发的全面支持的消息。

To enable Hibernate we have to (according to Intellij support ):要启用 Hibernate 我们必须(根据Intellij 支持):

1) Create a Hibernate configuration file hibernate.cfg.xml. 1)创建Hibernate配置文件hibernate.cfg.xml。

2) Download the library files that implement the Hibernate framework and add them to the dependencies of the corresponding module. 2)下载实现Hibernate框架的库文件,添加到对应模块的依赖中。

Is it the right way?这是正确的方法吗? If so - what are the libraries I have to download (I intend to use JPA)?如果是这样 - 我必须下载哪些库(我打算使用 JPA)?

In the documentation , they say that:文档中,他们说:

This feature is supported in the Ultimate edition only.此功能仅在 Ultimate 版中受支持。

You are able to use Hibernate with IntelliJ Community like any other library.您可以像使用任何其他库一样将 Hibernate 与 IntelliJ 社区一起使用。 Indeed, only the Ultimate version offers Hibernate support but you can still add the dependency to the project then configure everything manually.实际上,只有 Ultimate 版本提供 Hibernate 支持,但您仍然可以将依赖项添加到项目中,然后手动配置所有内容。

You can empower your IntelliJ IDEA Community Edition using the JPA Buddy plugin: https://plugins.jetbrains.com/plugin/15075-jpa-buddy .您可以使用 JPA Buddy 插件启用您的 IntelliJ IDEA 社区版: https://plugins.jetbrains.com/plugin/15075-jpa-buddy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM