jayzee
jayzee

Reputation: 225

generating java entities from MySQL tables

I have 3 MySQL tables and i need to generate their corresponding entities in java (eclipse) is there an easy way ? im working on a spring boot application

Upvotes: 1

Views: 272

Answers (1)

Roie Beck
Roie Beck

Reputation: 1175

While the majority of people will recommend jpa(spring data) this is codeFirst approach, for DB first approach I have a great framework recommendation:

If you have some time on your hand I will go and try Jooq

Jooq website

Jooq has a maven dependency for creating all necessary objects from your db:

Jooq auto code generation from db

codeGen configuration in maven

Jooq can connect to your db, and even connect to your liquibase schema upgrades so that the object are always on the same stage with the db

I don't have any connection to Jooq but Lukas Eder (@lukaseder) is an awsome guy, he always answer questions in stack Overflow, so you are in good hands, also if you are using reactor Jooq is fully compatible(also compatible with JavaRX)

Upvotes: 1

Related Questions