JPA Buddy
JPA Buddy is an IntelliJ IDEA plugin that helps developers work efficiently with Hibernate, EclipseLink, Spring Data JPA, Flyway, Liquibase, Lombok, MapStruct, and other related technologies in both Java and Kotlin.
note
Starting with 2023.3, the JPA Buddy plugin is maintained by JetBrains. Just as before, you can install it from JetBrains Marketplace. Free features are available in both IntelliJ IDEA Community Edition and IntelliJ IDEA Ultimate. Features that were previously available as part of the paid version are now available for free in IntelliJ IDEA Ultimate.
The plugin lowers the barrier to entry into development with JPA, boosts developer’s productivity, and makes sure your code follows best practices.
JPA Buddy provides:
JPA Entities generation based on tables (reverse engineering)
Coding assistance to make development more straightforward and transparent
You can use JPA Buddy in any project with Spring Boot, Jakarta Enterprise Edition, Quarkus, Micronaut, or even without any framework.
This functionality relies on the JPA Buddy plugin, which you need to install and enable.
Press CtrlAlt0S to open settings and then select Plugins.
Open the Marketplace tab, find the JPA Buddy plugin, and click Install (restart the IDE if prompted).
Every version of JPA Buddy supports a range of IntelliJ IDEA versions. For example, JPA Buddy 2023.1 works correctly with IntelliJ IDEA 2022.2, 2022.3, and 2023.1. If you need to install JPA Buddy on the other version of IntelliJ IDEA, you need to install the plugin from disk.
Open the Versions tab on the JPA Buddy page in JetBrains Marketplace.
Download the version of the plugin compatible with your version of IntelliJ IDEA.
Press CtrlAlt0S to open settings and then select Plugins.
On the Plugins page, click and then click Install Plugin from Disk.
Select the plugin archive file and confirm your selection.
Click OK to apply the changes and restart the IDE if prompted.
JPA Buddy scans the project dependencies and enables the corresponding features. In a multi-module project, features are enabled based on the presence of the dependency within the module, not the entire project.
note
Every time you add dependencies in the Maven or Gradle build script, click Load Maven Changes or Sync Gradle Changes in the top-right part of the editor or press CtrlShift0O.
Dependency | Features |
---|---|
| |
| |
Add Hibernate Validator annotations to Entity and DTO attributes via JPA Designer and DTO generator wizard respectively. | |
Assign Hibernate Custom Types to attributes via a code inspection with a quick fix (AltEnter). | |
| |
| |
Create MapStruct mappers to convert entities to DTOs and back. | |
Create Blaze Persistence Entity View for JPA Entity. | |
Create Spring Data JPA repository for Blaze Persistence Entity View. | |
|
If JPA Buddy detects one of the supported dependencies, you can use the following visual tools:
Editor toolbar
JPA Designer tool window
tip
Previously, the JPA Explorer tool window was also a part of JPA Buddy. Starting from IntelliJ IDEA 2024.2, most of the features from JPA Explorer are available in the Persistence tool window.
If you find a bug in JPA Buddy or want to suggest a feature or an improvement, feel free to create a ticket on YouTrack.
Thanks for your feedback!