DEV Community


Customize POJO generation from IntelliJ Database tool window

Geoff Bourne
I am a fullstack developer with a focus on backend in Java with Spring, React, Docker
・1 min read

I was already a huge fan of IntelliJ Ultimate's Database Tool Window; however, today I found a gem hiding further down in the context menu: Scripted Extensions.

What brought me there in the first place was that I wanted to generate some bare-bones POJOs that were Lombok @Data annotated and had simple JPA @Column fields for use with JOOQ. IntelliJ Ultimate comes with a Scripted Extension, Generate POJOs.groovy, that got pretty close. So, I started with that and created a copy of that file...

Alt Text

...with this content:

Now I can select tables, right-click, and run the extension:

Alt Text

Discussion (0)