简体   繁体   中英

Where is the Persistence tool window in Intellij IDEA 15?

I want to generate model Class from mysql database, but I cannot find the persistence tool window which is easily searched in IDEA 14.

If you haven't included JavaEE Persistance when you created your project as @Freek de Bruijn suggested, you can go into:

File - > Project Structure - > Modules -> + -> "JPA"

That will enable persistence under Tool windows as well if, like me, you checked out your project from version control. Took me quite a bit of time to find that setting actually.

The persistence support is available in IntelliJ IDEA Ultimate Edition (and not in the Community Edition, I think). When you create a new project in for example IntelliJ IDEA 15.0.3 EAP (build 143.1453.5), the New Project dialog opens:

新建项目对话框

There you can for example select "Java Enterprise" in the left panel and "JavaEE Persistence (2.0)" in the "Additional Libraries and Frameworks" list. Now the Persistence panel can be opened via the View | Tool Windows | Persistence menu. The Persistence panel is visible here in the bottom left part:

具有持久性面板的 IntelliJ IDEA

Echoing what @0x6C38 said here. File-> Project Structure -> Modules -> + then type in JPA.

在此处输入图像描述

Then you will have it in the Tool Windows. 在此处输入图像描述

If the persistence tool window is not visible then maybe it will help to add the Framework Support with this:

In the project window. Right click at the name then 'Add Framework Support...'

Enable here the JPA support.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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