Thiyaga B
Thiyaga B

Reputation: 981

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

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

Upvotes: 2

Views: 2178

Answers (3)

Mohannd
Mohannd

Reputation: 1438

I think NetBeans is the Best and the easiest. Just right click on your web project and click on new as the picture

enter image description here

and if you want to create restfull web services from entity classes Just right click on your entity classes package and click on new

enter image description here

Getting Started with RESTful Web Services

Upvotes: 1

Bacteria
Bacteria

Reputation: 8596

In your case I think the IDE which you are using or you have option to use that is very important.

For MyEclipse

If you have option to use MyEclipse then you can expose JPA Entities via REST Web Services very easily without installing any plugins. Here is the link Exposing JPA Entities via REST Web Services

Texo

You can also go for Texo if you think that is suitable for you

or if you are using Oracle WebLogic Server 12c (12.1.2) or later then Oracle® Fusion Middleware Solutions will be a good choice

Upvotes: 0

Giovanni
Giovanni

Reputation: 543

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

 jpa-generate-entities-from-table

to generate the entities (JPA classes) and then

rest-generate-endpoints-from-entities

to generate the REST endpoints.

Upvotes: 1

Related Questions