Search code examples
springspring-booteclipsespring-mvccode-generation

Is there any tool for eclipse or as CLI which can create repositories for JPA Entity Classes


I have lot of JPA Entity Classes and I have to write service and repository classes for all Entities, Manually it may take lot of time to write each and everything from scratch.

I have Create Entities with JPA Tools (an eclipse plugin to generate entity classes from table and vice versa) and cross checked the columns in DB and properties in entity classes are correctly mapped. I saw JPA Buddy but it is an intelliJ idea plugin and many of good features are paid. I need something related to Eclipse or ping name if there is a CLI tool too.


Solution

  • For this kind of need you can use Telosys code generator ( https://www.telosys.org/ ) that's exactly what it was created for.

    There are bundles of templates for JPA (and other targets : Spring, controllers, services, etc )

    See also this answer : What are the best Java code generation tools or plugins to use in Eclipse?
    and the documentation : https://doc.telosys.org/