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.
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.
Install the JPA Buddy plugin
This functionality relies on the JPA Buddy plugin, which you need to install and enable.
Press Ctrl+Alt+S to open settings and then select
.Open the Marketplace tab, find the JPA Buddy plugin, and click Install (restart the IDE if prompted).
Install a specific version of the JPA Buddy plugin
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 Ctrl+Alt+S to open settings and then select
.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.
Dependencies
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.
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 (Alt+Enter). | |
| |
| |
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. | |
|
JPA Buddy visual tools
If JPA Buddy detects one of the supported dependencies, you can use the following visual tools:
Editor toolbar
JPA Explorer tool window
JPA Designer tool window
Issue Tracker
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.