用于RESTful服务的自动类生成器 [英] Auto Class Generators for RESTful services

查看:252
本文介绍了用于RESTful服务的自动类生成器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有什么,
我有一个数据库模式,包含10个表和表之间的基本关系(一对一,一对多)。



我需要什么,
我需要使用基本的CRUD操作创建webservices来访问此数据库数据(让我们忽略现在的业务逻辑层)



我所知道的,
我知道我们有JPA来生成实体,而jackson要在json和POJO类之间进行映射。



现在有一个工具将DB Schema作为输入并生成RESTful服务类,带有jackson注释的JPA实体



注意:
我们可以使用Spring来实现其中的大部分功能。但我不想出于各种其他原因使用Spring或任何J2EE框架。

解决方案

我认为



如果你想从实体类创建restfull web服务
只需右键单击你的实体类包并点击新的





RESTful Web服务入门


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.

解决方案

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

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

Getting Started with RESTful Web Services

这篇关于用于RESTful服务的自动类生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆