DEV Community

Geoff Bourne
Geoff Bourne

Posted on

Customize POJO generation from IntelliJ Database tool window

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

Latest comments (0)