thiyagab thiyagab - 5 months ago 18
Java Question

Auto Class Generators for RESTful services

What I have,
I have a DB schema with 10 tables and basic relationships (one to one, one to many ) between the tables.

What I need,
I need to create webservices to access this DB Data (Lets ignore the business logic layer as of now) with basic CRUD operations

What I know,
I know we have JPA to generate entities, and jackson to map between json and POJO classes.

Now is there a tool which takes the DB Schema as input and generates the RESTful service classes, JPA entities with jackson annotations

We can use Spring to achieve most of it. But I dont want to use Spring or any J2EE framework for various other reasons.


Have you considered JBoss Forge? It's a tool that allows you, amongst many other things, to generate JPA entities from table and generate REST services as well (I've personally tested the JPA entities generation only). It doesn't rely on any framework, only on Java EE standard such as JPA and JAX-RS.

After creating the new project you have to call


to generate the entities (JPA classes) and then


to generate the REST endpoints.